简体   繁体   中英

Screen lighting on Kotlin when Push notification arrives

When the application is closed, and the phone screen is off, the phone receives push notifications. At this time, Android phones can receive push notifications, but they don't turn the screen on.

Please tell me how to turn the screen on of a turned off phone screen when push notifications from the application come in.

You can not control that as far as I know in modern Android.
It's up to the individual user to set up the system setting to allow push notifications to turn on the screen.

As an example in Android 11 the setting is under Lock Screen -> Wake Lock screen for notifications

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM