![]() ![]() ![]() ![]() |
|||||
|
|||||
樓主 slise ![]()
![]() |
請問我如何在不Root的情況下對 input swipe能起作用, 以下是我的內容: AutoTouch autoTouch = new AutoTouch(); autoTouch.autoClickPos(600,200,220,200); public class AutoTouch { public static void autoClickPos(final double x1, final double y1,final double x2, final double y2) throws IOException { Log.i("json", "in-swipe"); new Thread(new Runnable() { @Override public void run() { //利用ProcessBuilder執行shell指令: String[] order = {"input", "swipe", "" + x1, "" + y1, "" + x2, "" + y2}; try{ new ProcessBuilder(order).start(); } catch (Exception e) { Log.i("json", "error"); } } }).start(); } } |