title: How to detect and control the phone lock/unlock on android?
body: <p>I want to make that the phone ask a question(from database) when the phone is locked (locked =  the keyboard is locked ) and the user want to unlock. If the answer is correct then the phone is unlocked, else the phone ask another question.</p>
  
  <p>I don't know how to detect the unlock and unlock/lock the phone when I want.</p>
  
  <p>Please, help me </p>