简体   繁体   English

如何在Android上执行水龙头按住?

[英]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. 我正在尝试在Android设备上编写轻按并按住的脚本,但还没有弄清楚该如何做。

I tried playing with the input command options but couldn't find anything relating to holding. 我尝试使用input命令选项,但找不到与保持有关的任何内容。

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. 我还研究了MonkeyRunner ,它可以从连接了Android设备的计算机成功获得所需的效果,但是如果没有计算机,就无法在设备本身上运行monkeyrunner

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) ? 有没有一种方法可以在Android设备上编写点击并按住/仅按下/长按的脚本(我现在仅使用外壳程序)? If so how ? 如果可以,怎么办?

There are several ways to inject events. 有几种注入事件的方法。 You can use Robotium or Monkeyrunner for testing. 您可以使用Robotium或Monkeyrunner进行测试。 Or you can try to inject events directly this way. 或者,您可以尝试通过这种方式直接注入事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在CarouselView Android中点按并按住图片? - How to tap and hold an Image in CarouselView Android? Phonegap Android点击并按住 - Phonegap Android tap and hold 使用jQuery在Android上确定长按(长按,点按保持) - Determining Long Tap (Long Press, Tap Hold) on Android with jQuery 有没有办法在 Android 上使用 Appium 执行双击? - Is there a way to perform a double tap using Appium on Android? 如何在Android的GCM通知中实施“按住并下拉以显示整个消息” - How to implement the “tap-hold and pull down to show the entire message” in GCM notifications in Android 如何使用appium对Android UI的python脚本中的垂直边界/坐标执行点击/点击操作 - How to perform click/tap operation to the perticular bound/co-ordinates in python script for Android UI using appium 在Android中,如何实现某些单词具有触摸侦听器以检测轻击和按住手势的文本? - In Android, how can I implement text where some of the words have touch listeners to detect tap and hold-down gestures? 如何使用 AccessibilityService 执行触摸和保持手势? - How to perform a touch and hold gesture using AccessibilityService? 如何使用代码执行触摸和按住操作? - how to perform Touch and Hold Operation with code? 如何点按以停止Android中的公告? - How to tap to stop announcements in android?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM