android在root模式下接聽來電的方法
更新時間:2014年03月16日 10:23:40 作者:
這篇文章主要介紹了android在root模式下接聽來電的方法,需要的朋友可以參考下
使用了Root Tools 來招待命令。https://code.google.com/p/roottools/
復(fù)制代碼 代碼如下:
/**
* 接聽來電
*/
private void answerRingingCall()
{
try
{
Command command = new Command(0, "input keyevent 5")
{
@Override
public void output(int id, String line)
{
Log.d(Tag, line);
}
};
RootTools.getShell(true).add(command).waitForFinish();
}
catch (InterruptedException e)
{
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}
catch (TimeoutException e)
{
e.printStackTrace();
}
catch (RootDeniedException e)
{
e.printStackTrace();
}
}
相關(guān)文章
android中選中菜單的顯示跳轉(zhuǎn)和隱式跳轉(zhuǎn)的實例介紹
android中選中菜單的顯示跳轉(zhuǎn)和隱式跳轉(zhuǎn)的實例介紹,需要的朋友可以參考一下2013-05-05Android RecyclerView實現(xiàn)水平、垂直方向分割線
這篇文章主要為大家詳細(xì)介紹了Android RecyclerView實現(xiàn)水平、垂直方向分割線,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-07-07android studio 使用adb 命令傳遞文件到android 設(shè)備的方法
這篇文章主要介紹了android studio 使用adb 命令傳遞文件到android 設(shè)備的相關(guān)資料,非常不錯,具有參考借鑒價值,需要的朋友可以參考下2017-11-11Android 優(yōu)化之a(chǎn)pp啟動優(yōu)化的實現(xiàn)
這篇文章主要介紹了Android 優(yōu)化之啟動優(yōu)化的實現(xiàn),啟動分為冷啟動和熱啟動,溫啟動,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-07-07Android中ListView如何分頁加載數(shù)據(jù)
這篇文章主要介紹了Android中ListView如何分頁加載數(shù)據(jù),本文就結(jié)合實例來演示一下使用ListView獲取數(shù)據(jù)的過程,需要的朋友可以參考下2015-12-12