What are you running this on?  In the standard platform implementation this
is pretty much not possible.  (All it does is call into the activity manager
which returns whether one of its variables is non-null.)

On Sun, Oct 17, 2010 at 8:24 PM, George <[email protected]> wrote:

> // Short Msg: java.lang.RuntimeException
> // Long Msg: java.lang.RuntimeException: Unknown exception code: 1 msg
> null
> ...
> // Build Changelist: 1681
> // Build Time: 1286811002000
> // java.lang.RuntimeException: Unknown exception code: 1 msg null
> //      at android.os.Parcel.readException(Parcel.java:1257)
> //      at android.os.Parcel.readException(Parcel.java:1235)
> //      at
> android.app.ActivityManagerProxy.isUserAMonkey(ActivityManagerNative.java:
> 2754)
> //      at
> android.app.ActivityManager.isUserAMonkey(ActivityManager.java:990)
>
> I get the following exception when trying to use the isUserAMonkey API
> on a keydown.
>            mAM =
> (android.app.ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
>            if (mAM.isUserAMonkey()) {
>                return true;
>            }
> Any reason why this may be happening?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to