public static boolean isMonkeyRunning(){
  return ActivityManager.isUserAMonkey();
}

public static boolean isMonkeyRunning ( ) { return ActivityManager . isUserAMonkey ( ) ; }
returns true if monkey is running .
