Skip to content
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

POST_NOTIFICATIONS don't work for Android 10 #128

Open
FranGhe opened this issue Feb 21, 2024 · 1 comment
Open

POST_NOTIFICATIONS don't work for Android 10 #128

FranGhe opened this issue Feb 21, 2024 · 1 comment

Comments

@FranGhe
Copy link

FranGhe commented Feb 21, 2024

I have a Cordova Project and two devices... one with Android10 and the other with Android13.
All devices have notification permissions but with Android10 it always return false.

var permissions = cordova.plugins.permissions;
permissions.checkPermission(permissions.POST_NOTIFICATIONS, function( status ){
    if ( status.hasPermission ) {
      console.log("Yes :D ");
    }
    else {
      console.warn("No :( ");
    }
});

Is there a way to fix it?

@faugusztin
Copy link

That permission doesn't exist for devices before Android 13, thus when you request it, you get a negative response, as that permission doesn't exist in the system.

You do not ask for that permission on Android 12L and older, you just assume you have the right for notifications automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants