Skip to content Skip to sidebar Skip to footer

Android -- What Happens When Device Is Unlocked?

I am trying to understand the intents that get launched when the device is unlocked. For eg: Say my activity is running, and I press the power button (screen off, to lock the phon

Solution 1:

Solution 2:

Additionally to

ACTION_USER_PRESENT

Broadcast Action: Sent when the user is present after device wakes up (e.g when the keyguard is gone). (API Lvl 3)

Android SDK 24 added

ACTION_USER_UNLOCKED

Broadcast Action: Sent when the credential-encrypted private storage has become unlocked for the target user. This is only sent to registered receivers, not manifest receivers.

Post a Comment for "Android -- What Happens When Device Is Unlocked?"