In ionic 5 (Cordova), phonegap-plugin-push not supporting for Push Notification Receiving.
Android version 12 and Greater versions as well as IOS
phonegap-plugin-push has been deprecated and not maintained for a few years, the default version of firebase that it uses doesn’t support Android 12. You can try using the FCM_VERSION
variable on install to use a newer version of firebase, but it’s very likely that it will break the code since it uses 17 and latest is 23.
cordova plugin add phonegap-plugin-push --variable FCM_VERSION="23.1.2"
If it doesn’t work, you can try https://github.com/havesource/cordova-plugin-push
plugin as it’s the direct replacement of phonegap-plugin-push
, it has the Android 12 problem fixed, but not release, so you’ll have to install the plugin from the github url
cordova plugin add https://github.com/havesource/cordova-plugin-push
i am getting error
[Gradle Properties] Detected Gradle property “android.useAndroidX” with the value of “true”, Cordova’s recommended value is “false”
[Gradle Properties] Detected Gradle property “android.enableJetifier” with the value of “true”, Cordova’s recommended value is “false”
so tried to install androidx but lo luck.
i am using “cordova-android”: “^9.1.0”, || ionic 5
to properly support Android 12 you’ll also need to use cordova-android 11
it is possible to update cordova-android 11 in ionic -5 version ??
Yes, Cordova doesn’t care which Ionic version you use.