How can I wake an Android device and skip the screen lock

As a name, can I wake my phone and skip the screen? I want to write an application based on an alarm, when this time, the application should detect something in the background, even when the phone is sleeping. When something is detected, the phone should automatically wake up, skip the screen and show the image (start a new action). Can someone give me some tips or examples? Many thanks!

+5
source share
1 answer

The activity you started requires one or both of the following layout options.

Use FLAG_SHOW_WHEN_LOCKEDto make the activity appear above the screen lock.

Use FLAG_DISMISS_KEYGUARDto automatically unlock the keypad.

Learn more at http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html .

+4
source

All Articles