-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications not showing up on locked devices for newer version android #62
Comments
So I've investigated this further and noticed it does have to do with the settings on newer devices, we need to give explicit permission for the notification to appear on locked screens. Without the permissions, it won't appear. I tried updating the code to make it so that we wouldn't need to prompt the user but I couldn't find a way to do it. I did see that spotify does have a way of doing it without the permissions so it should be possible. I couldn't figure it out though. |
have you open the app settings notification? |
This is because after Android 11 you need to use Media Controls instead of regular notifications. https://developer.android.com/guide/topics/media/media-controls |
@roeku @jeromexiong @rares45 |
I've tested this on an OnePlus and it functions fine. But running the same code on Xiaomi devices for some reason doesn't show the notification when the phone is locked. It does show it when you pull the notifications drawer down when the phone is open, but not on the locked screen. I was thinking it might have to do with the
NotificationManager.IMPORTANCE_LOW
but tried setting that to different levels but that didn't help. Any advice on how to fix would be much appreciated.The text was updated successfully, but these errors were encountered: