Is there an intent that is fired when a user unlocks their screen? I want my app to adjust the brightness when the screen turns on, but the problem im running into is that the screen on intent is fired on the lock screen and it does not adjust the display on that screen.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
Yes, the
ACTION_USER_PRESENT
is broadcasted after the user unlocks:http://developer.android.com/reference/android/content/Intent.html#ACTION_USER_PRESENT
Note that this is a protected broadcast and if the user is using a lock screen replacement such as
WidgetLocker
orNoLock
theUSER_PRESENT
may not be sent or may be sent at the wrong time.For detecting
WidgetLocker
's unlock see: http://teslacoilsw.com/widgetlocker/developersAdd the receiver in menifest file
Create a broadcast receiver which works to open app when phone is unlocked.
I'm sure it will work.
Look at the
disableKeyguard
method in the KeyguardLock class.