IITDU Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Android- isUserAMonkey()

4 posters

Go down

Android- isUserAMonkey() Empty Android- isUserAMonkey()

Post by BIT0122-Amit Sun Jun 05, 2011 8:59 pm

Today I just noticed some of the functions available in Android libraries. Apparently, Google decided to make programmers give a chance to humor themselves while coding.

Like:

public static int wtf (String tag, Throwable tr)
Since: API Level 8
What a Terrible Failure: Report an exception that should never happen.
Similar to wtf(String, String), with an exception to log.

And

public static boolean isUserAMonkey()

Since: API Level 8
Returns "true" if the user interface is currently being messed with
by a monkey.

Of course, we know that it seriously does not mean, "what a terrible failure" Android- isUserAMonkey() 221617

Anyway, check this link guys. Gave me a good laugh Android- isUserAMonkey() 567595

http://www.reddit.com/r/programming/comments/c6u6f/new_android_22_froyo_api_logwtf/
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Android- isUserAMonkey() Empty Re: Android- isUserAMonkey()

Post by BIT0112-Rokon Mon Jun 06, 2011 4:50 am

Interesting ..SmileSmile

I will write some like this:)Smile

if(isUserMonkey()){
// do something ..
}else if(isUserAmit()){
kickOnHisButt();
} else {
// do something else
}
BIT0112-Rokon
BIT0112-Rokon
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : O+
Posts : 673
Points : 1269

http://blog.codexplo.org

Back to top Go down

Android- isUserAMonkey() Empty Re: Android- isUserAMonkey()

Post by BIT0122-Amit Mon Jun 06, 2011 12:37 pm

I would write:

Code:
if(isUserMonkey()){
 if(userIsBRR){
          System.out.println("Br br br br br br brrrrrrrrrrrrrrrrrrrrrrrrrr");
          System.Exit(9);
}

}

very very funny
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Android- isUserAMonkey() Empty Re: Android- isUserAMonkey()

Post by benjamin444 Fri Aug 05, 2011 7:52 pm

I get the 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?

benjamin444
Pre-Alpha Release
Pre-Alpha Release

Course(s) :
  • N/A

Blood Group : NULL
Posts : 3
Points : 3

Back to top Go down

Android- isUserAMonkey() Empty Re: Android- isUserAMonkey()

Post by johnmathew44 Fri Feb 24, 2012 11:09 pm

What is Monley runner?actually

johnmathew44
Pre-Alpha Release
Pre-Alpha Release

Course(s) :
  • N/A

Blood Group : NULL
Posts : 1
Points : 1

Back to top Go down

Android- isUserAMonkey() Empty Re: Android- isUserAMonkey()

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum