There are several ways to inject events. You can use Robotium or Monkeyrunner for testing. Or you can try to inject events directly this way.
How to perform tap hold on android?
-
03-06-2022 - |
Question
I'm trying to script a tap and hold on an Android device and I haven't worked out how.
I tried playing with the input
command options but couldn't find anything relating to holding.
I've also looked at MonkeyRunner and could succesfully get the desired effect from a computer with the Android device connected, but couldn't run monkeyrunner
on the device itself, without a computer.
Is there a way to script a tap and hold/tap down only/long tap on an Android device (I'm just using the shell for now) ? If so how ?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow