As title, is it possible for me to wake my phone up and skip the screenlock? I want to write an app based on the alarm clock, when it's time, the app should do detect something in the background even when the phone is sleeping. When something is detected, the phone should automatically wake up, skip the screenlock, and show a picture(start a new activity ). Can anybody give me some suggestions or examples on these? Thanks a lot!
The activity you're starting needs one or both of the following layout parameters.
Use FLAG_SHOW_WHEN_LOCKED
so that the activity appears above the screenlock.
Use FLAG_DISMISS_KEYGUARD
to automatically dismiss the keyguard.
More details at http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With