title: Screen goes off when Press a button,Android
body: <p>I want the user to press the button on the screen and then the screen goes completely off, and if possible, the screen can turn on again within defined time. </p>
  
  <p>I don't want to lock the phone but just like you having the phone call, and if your face placed close enough to your phone, the screen will go totally dark.</p>
  
  <p>Please help,Thanks</p>
  
  <p><img src="https://i.stack.imgur.com/ouX5t.png" alt="flowchart"></p>