Proper use cases for Android ActivityManager.isUserAMonkey()?

I was looking at the new APIs introduced in Android 2.2. While looking at the ActivityManager class I came across the following method:

public static boolean isUserAMonkey()

Used to determine whether the user making this call is subject to teleportations.

Returns whether the user making this call is a monkey.

How and when should this be used?


as per android docs

Returns "true" if the user interface is currently being messed with by a monkey. 

to know the application is testing using monkey or not


well if you do some automatic testing there will be test users. this method checks if the current user is such a test user.

about how to use it there are already a lot of topics, see: clickMe

链接地址: http://www.djcxy.com/p/2658.html

上一篇: 在JavaScript中生成UUID时发生冲突?

下一篇: 适用于Android ActivityManager.isUserAMonkey()的正确用例?