Closed kyleabens closed 1 year ago
For those that come across this issue, I fixed this in my Ionic Capacitor app by doing the following:
Open android > variables.gradle
and change firebaseMessagingVersion
to 23.0.0
Then because I also use @capacitor/push-notifications plugin I had to add implementation "com.google.firebase:firebase-iid:21.1.0"
to the dependencies in node_modules > @capacitor > push-notifications > android > build.gradle
reopening cause maybe it's better to upgrade here too. is anyone interested in sending a PR?
Is the "upgrade" here as simple as incrementing the version number? Or will there likely be other changes required?
I haven't delved much into the details of how Capacitor plugins actually work (I've only been using them - gratefully)
Is the "upgrade" here as simple as incrementing the version number? Or will there likely be other changes required?
I haven't delved much into the details of how Capacitor plugins actually work (I've only been using them - gratefully)
Yeah I think so. We need to just increment and test the plugin to make sure nothing breaks.
Describe the bug I'm able to obtain the token no problem but when a notification is triggered I get the following error in Android Simulator and no push notification is presented on the device. This is an issue with Android 12.
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent
To Reproduce Steps to reproduce the behavior:
Expected behavior To receive the push notification on the device when the app is closed
Smartphone (please complete the following information):