到底是什么猴子做我的Andr​​oid手机搞乱? [英] What exactly is a monkey doing messing with my Android phone?

查看:164
本文介绍了到底是什么猴子做我的Andr​​oid手机搞乱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看通过Android API的我发现了一个方法调用<一个href="http://developer.android.com/reference/android/app/ActivityManager.html#isUserAMonkey%28%29">isUserAMonkey(), 说它返回如果手机被一只猴子被搞砸。

Looking through the Android apis I found a method call isUserAMonkey(), says it returns true if the phone is being messed with by a monkey.

这是一个玩笑,或者是什么用的?

Is this a joke, or what is it used for?

推荐答案

看<一href="http://developer.android.com/guide/developing/tools/monkeyrunner_concepts.html">monkeyrunner,它会给你答案。

从文件中引用:

该monkeyrunner工具提供了一个API,用于编写程序   控制从Android的code之外的Andr​​oid设备或仿真器。   随着monkeyrunner,您可以编写安装一个Python程序   Android应用程序或测试包,运行它,发送击键它,   需要它的用户界面上的屏幕截图,并存储截屏   工作站。该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。

So if you are running a package using Monkeyrunner, then this function will return true.

这篇关于到底是什么猴子做我的Andr​​oid手机搞乱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆