Turning on screen programmatically
Posted
by Matroska
on Stack Overflow
See other posts from Stack Overflow
or by Matroska
Published on 2010-05-23T10:21:45Z
Indexed on
2010/05/23
10:31 UTC
Read the original article
Hit count: 336
Hi,
I would like to unlock screen and switching it on to show a popup on an event trigger. I am able to unlock the screen using
newKeyguardLock = km.newKeyguardLock(HANDSFREE);
newKeyguardLock.disableKeyguard();
on KeyGuardService but I cannot turn on the screen. I am using
wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, HANDSFREE);
wl.acquire();
but with no success. The screen still remains off. How can I achieve this? Thanks in advance.
Tobia Loschiavo
© Stack Overflow or respective owner