Android Lock phone and bring native lock screen to front
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4545079/lock-the-android-device-programatically">Lock the android device programatically</a>  </p>
</blockquote>



<p>i am new on android and wanted to play around with unlocking and locking the screen i have gone through a lot of documentation mainly on developer.android.com and came across the device admin api, my knowledge on api's is fair. but the documentation is confusing me, is there any one who can explain to me how to start or go about this matter ihave also tried the key gaurd lock.disableKeyguard(); works fine but lock.reenableKeyguard(); does not seem to work. i have read a blog, where someone tried a similar thing but it locked his key pad. I tested mine on a touch screen with a button on click, tried DevicePolicyManager mDPM;
mDPM.lockNow(); with the onclick aswell. Thanks in advance C.</p>
