Reputation: 34103
I have a cordova app that is using cordova-plugin-firebasex to send push notifications to iOS and Android. Everything works fine on iOS. Things also work fine on Android 11 but not on android 12 or 13.
I am testing the functionality using the firebase console's cloud messaging feature where you can input a message title, body, and push notification token.
The app is actually receiving the push notifications on all versions of Android, even on 12 and 13. I can see the
window.FirebasePlugin.onMessageReceived()
is actually being called with the correct data. The problem is that on Android 12 and 13 the push notification is not popping up in the os notification tray on the phone.
I'm testing with the app running but in the background so it's not because I have the app open when I receive the notification.
What's more, receiving push notifications on Android 12 and 13 with the app in the background appears to crash the app. If I send a test notification through firebase, then I open my app, it has clearly rebooted.
configuration:
$ node --version
v16.16.0
$ npm --version
8.11.0
$ cordova --version
11.0.0
$ cordova platform
Installed platforms:
android 9.1.0
ios 6.3.0
cordova-plugin-firebasex version:
12.1.0
Upvotes: 0
Views: 1303
Reputation: 34103
This appears to be related to the version of cordova-plugin-firebasex that I was using. I upgraded from version 12.1.0 to 16.0.0 and the issues went away.
Upvotes: 0