/**
* 模拟点击
*/
public void simulateTap(int x,int y) {
java.lang.Process process = null;
try {
process = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(
process.getOutputStream());
os.writeBytes("input tap " +x +" "+y + "\n");
//os.writeBytes("exit\n");
os.flush();
int flag = process.waitFor();
debugW("preinstallApk.......flag:"+flag);
} catch (Exception e) {
} finally {
try {
process.destroy();
} catch (Exception e) {
}
}
}
android 模拟单击屏幕
最新推荐文章于 2022-11-13 12:17:25 发布