title: Lock the Android device programmatically
body: <p>I have been trying to lock the device through program. But I can't find the solution still.
  I want to lock Android froyo2.2 through program. I have tried keyguardmanager and DeviceAdminManager.</p>
  
  <p>My app is to remote lock the device. When message is received with some code words to lock then it locks the phone. I have found many Api_demo program as solution but I can't extract lock code alone from that and find solution.</p>