How to turn android to sleep mode
<p>I build a simple application to test the sleep option of the android mobile</p>

<p>I put this code inside the button:</p>

<pre><code>Intent lockscreen=new Intent();
lockscreen.setAction(Intent.ACTION_SCREEN_OFF);
startActivity(lockscreen);
</code></pre>

<p>with no change ,
also I put the permission...I want when I press this button my phone would locked (not locked by password) (normal lock)<br>
Any Help. </p>
