I am trying to make my service emulate tap input, but it isn't working.
My main activity already called
try {
Runtime.getRuntime().exec("su");
} catch (IOException e) {
e.printStackTrace();
}
My service checks if a toggle button is clicked I want to call
try {
Runtime.getRuntime().exec("input tap" + Main.xValue.toString() + Main.yValue.toString());
} catch (IOException e) {
e.printStackTrace();
}
But to no success, could someone explain why?