Closed florgb02 closed 1 year ago
@florgb02 try to upgrade to the latest version of the plugin. I don't think v4.4.2 supports android 30-31.
Thanks @chemerisuk unfortunately we can't upgrade at the moment but I was able to patch the plugin to target firebase.messaging version 23.0.0 and support for :firebase-iid:21.1.0 Both contain fixes to support PendingIntent FLAG_MUTABLE and FLAG_IMMUTABLE
Adding:
<framework src="com.google.firebase:firebase-messaging:23.0.0" />
<framework src="com.google.firebase:firebase-iid:21.1.0" />
Thanks
@chemerisuk
This plugin was integrated a while ago on IONIC3+Cordova project. And recently we upgraded from API LEVEL 30 to 31
Unfortunately I am getting the PendingIntent FLAG_IMMUTABLE error required which is making the app crash on push notification sent and app is Background. Foreground push notification is working as expected.
Error Android: ... stack trace:java.lang.IllegalArgumentException: app: **Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Information: IONIC 3 @ionic-native/firebase-messaging: "^4.20.0" cordova-plugin-firebase-messaging: "4.4.2" "cordova-plugin-firebase-messaging": { "FIREBASE_MESSAGING_VERSION": "20.1.+", "ANDROIDX_CORE_VERSION": "1.2.+" },
Environment Details: Ionic: ionic (Ionic CLI) : 4.2.1 Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0
Cordova: cordova (Cordova CLI) : 10.0.0 Cordova Platforms : android 8.1.0
System: ios-deploy : 1.12.0 ios-sim : 8.0.2 NodeJS : v10.16.3 npm : 6.9.0 OS : macOS Xcode : Xcode 14.1 Build
Thanks