Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android -- What happens when device is unlocked?

Tags:

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 phone). INTENT.ACTION_SCREEN_OFF is launched. The activity is paused and the screen goes blank.

Now, when I press the power button again (INTENT.SCREEN_ON gets launched), the activity's onResume method is called. But the device is not yet unlocked.

What happens when the device is unlocked? To put it simply, what is the intent's action and category?

like image 466
Chris Avatar asked Aug 11 '10 21:08

Chris


1 Answers

Check out ACTION_USER_PRESENT.

like image 189
CommonsWare Avatar answered Nov 04 '22 06:11

CommonsWare