是否有Android的一类像java.awt.Robot中? [英] Is there a class in Android like java.awt.Robot?
本文介绍了是否有Android的一类像java.awt.Robot中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在寻找在Android中一个类不一样java.awt.Robot中的
I'm searching for a class in Android which does the same as java.awt.Robot
java.awt.Robot中能够效仿pressing和释放键。
java.awt.Robot is able to emulate pressing and releasing keys.
推荐答案
没有,就没有机器人
的等价物。应用程序无法控制其他应用程序,对于明显的隐私和安全的原因。
No, there is no equivalent of Robot
. Apps cannot control other apps, for obvious privacy and security reasons.
有关的测试,你可以在模拟pressing和释放键,通过任意数量的测试框架,如标准Android测试用例,可以uianimator和monkeyrunner。
For testing, you can "emulate pressing and releasing keys" through any number of test frameworks, such as the standard Android JUnit test cases, uianimator, and monkeyrunner.
这篇关于是否有Android的一类像java.awt.Robot中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文