通过查看 Android api,我发现了一个方法调用 isUserAMonkey() ,
表示如果手机被猴子弄乱,它会返回 true
。
这是个玩笑,还是用来干什么的?
最佳答案
看monkeyrunner ,它会给你答案。
引自文档:
The monkeyrunner tool provides an API for writing programs that control an Android device or emulator from outside of Android code. With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation. The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites, but you are free to use it for other purposes.
因此,如果您使用 Monkeyrunner 运行一个包,那么此函数将返回 true。
关于android - 一只猴子到底在搞什么我的 Android 手机?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7546402/