title: running under a locked screen in android
body: <p>I'm a Windows phone developer porting my apps to android.  I'm an android newbie...</p>
  
  <p>Windows Phone has a "locked mode" where the user can lock the phone to get rid of problems like pocket dialing, and other accidental gestures. Locked mode is different from turning the phone off. Our WP7 apps can remain running in the foreground when the phone is in Locked Mode if we set the app up to do so.</p>
  
  <p>In Android is there such a Locked Mode?  Do we have to do anything special to be able to keep running in the foreground when the phone is in locked mode?  Can we detect when we are running when in locked mode or not?
  thanks, Gary</p>