Reputation: 3494
I'd like to switch on the screen from a service and immediately let the default system timeout take over (i.e. not hold a wakelock for a specific time, but just hand over control to the system). I've tried WakeLock.acquire()
followed immediately by WakeLock.release()
(with a SCREEN_BRIGHT_WAKE_LOCK
), but that doesn't even switch on the screen at all. Is there any way to achieve this from a Service
(short of launching a new WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
-dummy-activity)?
Upvotes: 0
Views: 93
Reputation:
I think this is what you are looking for. You need to use
PowerManager.ACQUIRE_CAUSES_WAKEUP
Upvotes: 3