简体   繁体   中英

How to perform tap hold on android?

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM