When I try to run the following
process = Runtime.getRuntime().exec("input touchscreen swipe 100 1000 300 1000 1000"); //Normal swipe
it works.
However, when I am using it as following, it is not working.
String[] inputs = {"adb", "shell", "input touchscreen swipe 500 1000 600 1000 1000"};
Process p = Runtime.getRuntime().exec(inputs);
p.waitFor();
I've another command which I want to run, and for it to run, I have to use the second approach. Can someone tell me what is the reason or how can I make the second one run?