cordova-plugin-fcm-with-dependecy-updated
cordova-plugin-fcm-with-dependecy-updated copied to clipboard
Again notifications and SDK UPGRADE
Starting with SDK 33 they introduced runtime permissions for notifications.
From docs:
So all our apps (cordova not yet support sdk 33) installed first time on Android 13 will use this logic. I have a problem with my app, that it does not ask for the permission until I literally send first push notification and when the app is in foreground then it asks me for the permission. So 1 notification is always gone. After allowing, it works fine.
So the qustion is - what does it mean to open notification channel? Are you experiencing the same?
Regards, Michal
Oh wait, are you creating your notification channel on-the-fly? You could create the notification channel in the app onCreate instead.
@dchase-sir will it then automatically display Allow notifications prompt?
Hi @michal-kroliczek , you can check out this fork: https://github.com/4sh/cordova-plugin-fcm-with-dependecy-updated
We've just added the support for Android 13+ and updated the README page on our fork.
Installation can be done by targetting the git tag:
npm way
npm install cordova-plugin-fcm-with-dependecy-updated@git+https://github.com/4sh/cordova-plugin-fcm-with-dependecy-updated.git#7.10.0
old cordova fashion way (not tested)
cordova plugin add cordova-plugin-fcm-with-dependecy-updated@git+https://github.com/4sh/cordova-plugin-fcm-with-dependecy-updated.git#7.10.0
Afterward, in your app, calling FCM.requestPushPermission()
will trigger the permission dialog on Android 13+.