Search code examples
androidalarmmanagerwakelockandroid-wake-lock

android - wakelock sleep confusion


I'm a tad confused as to what exactly happens to the device when a wake is called from alarmmanager. Does the phone screen come on/light up?

I'm thinking of having things run overnight and I think it's pretty bad if the phone suddenly kicks into life and the screen comes on, potentially waking the user up!

Or am I not fully understanding a wake or wake lock?

Thanks

Russ


Solution

  • Does the phone screen come on/light up?

    AlarmManager, when it processes a _WAKEUP alarm, uses a PARTIAL_WAKE_LOCK, which does not light up the screen.