How To wake screen in android
<p>Hi i am making an Alarm Application. When Alarm Time Comes i Am showing user a Dialog. But the problem is i want to acquire the wake lock when dialog appears. just like when an sms received the screen just wakes.</p>

<p>i have try this one but is not working</p>

<pre><code>public class Alarm extends Activity{
    PowerManager pm;
    WakeLock wl;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        pm = (PowerManager) getSystemService(POWER_SERVICE);
        wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK, "FlashActivity");
wl.acquire()
        showAlarmDialog();
    }
    @Override
    protected void onPause() {
        // TODO Auto-generated method stub
        super.onPause();
        wl.release();
    }
}
</code></pre>

<p>I have added the wakelock permission too. Help Would be appriciated :-)</p>
