Android Screen Turn On Programmatically
<p>I'm using this codes for turn on the screen.</p>

<pre><code>getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
    | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
    | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
    | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
    | WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON);
</code></pre>

<p>But after first using this codes, the screen never turn off again.
I want to do turn on the screen but after that the screen again turn off when end of screen off time.
How can I do it?</p>