0

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)?

Nick
  • 3,504
  • 2
  • 39
  • 78

1 Answers1

3

I think this is what you are looking for. You need to use

PowerManager.ACQUIRE_CAUSES_WAKEUP
Community
  • 1
  • 1
  • This works perfectly, thanks so much :)!! I've spent days trying to figure out how I could achieve this. – Nick Aug 15 '13 at 21:40