Open manojsachdeva opened 2 years ago
I have exactly the same issue and already spent 8 hours to find what is wrong. Notifications work when app is in foreground, but when background, no notification is showed.
I updated to Cordova 11 and Android 11. Tried to build with OpenJdk11 and Oracle JDK 11.
Please help. It is urgent as now SDK 31 is required when uploading to store.
I have exactly same issue . Notifications work when app is in foreground, but when background, no notification is showed. I updated to Cordova 11 and Android 11. Tried to build with OpenJdk11 and Oracle JDK 11.
Please help. It is urgent as now SDK 31 is required when uploading to store.
please respond asap the suggested change require
You have to use newer Firebase SDK to comply with Android changes required about intents. Original repo is not maintained anymore.
Here is a fork done. It contains update and it is working for me. https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/pull/277 Please follow comments. Basicly you need to remove plugin and add it this way: cordova plugin add https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated
Thanks for responding I have done it but still receiving in foreground only
On 11/24/2022 5:22 PM PKT Michał Króliczek ***@***.***> wrote:
You have to use newer Firebase SDK to comply with Android changes required about intents.Original repo is not maintained anymore. Here is a fork done. It contains update and it is working for me.#277Please follow comments. Basicly you need to remove plugin and add it this way:cordova plugin add https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated#fcmonnotification —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Hi,
cordova -v 11.0.0
"cordova-plugin-fcm-with-dependecy-updated": "^7.8.0", this is in my package.json
please help
On 11/24/2022 5:22 PM PKT Michał Króliczek ***@***.***> wrote:
You have to use newer Firebase SDK to comply with Android changes required about intents.Original repo is not maintained anymore. Here is a fork done. It contains update and it is working for me.#277Please follow comments. Basicly you need to remove plugin and add it this way:cordova plugin add https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated#fcmonnotification —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
done all as you say but still not receiving
ionic -v 6.18.1
import { FCM } from 'plugins/cordova-plugin-fcm-with-dependecy-updated/src/ionic/FCM';
this is import
package.json
"cordova-plugin-fcm-with-dependecy-updated": {
"ANDROID_DEFAULT_NOTIFICATION_ICON": ***@***.***/ic_launcher",
"ANDROID_FCM_VERSION": "21.0.0",
"ANDROID_FIREBASE_BOM_VERSION": "26.0.0",
"ANDROID_GOOGLE_SERVICES_VERSION": "4.3.4",
“ANDROID_GRADLE_TOOLS_VERSION": "4.1.0”
}
Thanks,
Please help
On 11/24/2022 5:22 PM PKT Michał Króliczek ***@***.***> wrote:
You have to use newer Firebase SDK to comply with Android changes required about intents.Original repo is not maintained anymore. Here is a fork done. It contains update and it is working for me.#277Please follow comments. Basicly you need to remove plugin and add it this way:cordova plugin add https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated#fcmonnotification —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Then you did not install plugin from fork. You should have have following config:
I have now please check my last email
On 11/25/2022 2:33 PM PKT Michał Króliczek ***@***.***> wrote:
Then you did not install plugin from fork.You should have have following config: —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
"cordova-plugin-fcm-with-dependecy-updated": {
"ANDROID_DEFAULT_NOTIFICATION_ICON": ***@***.***/ic_launcher",
"ANDROID_FCM_VERSION": "21.0.0",
"ANDROID_FIREBASE_BOM_VERSION": "26.0.0",
"ANDROID_GOOGLE_SERVICES_VERSION": "4.3.4",
“ANDROID_GRADLE_TOOLS_VERSION": "4.1.0”
}
On 11/25/2022 2:33 PM PKT Michał Króliczek ***@***.***> wrote:
Then you did not install plugin from fork.You should have have following config: —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
same problem not working any in background after change 30 to 31
Notifications started working @michal-kroliczek @marutifh. I started using getInitialPushPayload() to retrieve the tapped notification.
cordova plugin remove cordova-plugin-fcm-with-dependecy-updated
cordova plugin add https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated --variable ANDROID_DEFAULT_NOTIFICATION_ICON="@mipmap/ic_launcher" --variable ANDROID_FCM_VERSION="23.0.0" --variable ANDROID_FIREBASE_BOM_VERSION="29.0.1" --variable ANDROID_GOOGLE_SERVICES_VERSION="4.3.4" --variable ANDROID_GRADLE_TOOLS_VERSION="4.1.0" --variable IOS_FIREBASE_MESSAGING_VERSION="~> 7.4.0"
Note: We are not simply removing and re-adding the plugin. We are adding marutifh's fork. Thanks guys
Notifications started working @michal-kroliczek @marutifh. I started using getInitialPushPayload() to retrieve the tapped notification.
cordova plugin remove cordova-plugin-fcm-with-dependecy-updated
cordova plugin add https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated --variable ANDROID_DEFAULT_NOTIFICATION_ICON="@mipmap/ic_launcher" --variable ANDROID_FCM_VERSION="23.0.0" --variable ANDROID_FIREBASE_BOM_VERSION="29.0.1" --variable ANDROID_GOOGLE_SERVICES_VERSION="4.3.4" --variable ANDROID_GRADLE_TOOLS_VERSION="4.1.0" --variable IOS_FIREBASE_MESSAGING_VERSION="~> 7.4.0"
Thanks guys
I tried this, but notif for background/foreground still not working.
I tried this, but notif for background/foreground still not working. For foreground: Inspect your cordova app with Chrome Inspector and try to shoot a notification (by pasting some code into the console) from there. Do you get any errors?
I tried this, but notif for background/foreground still not working. For foreground: Inspect your cordova app with Chrome Inspector and try to shoot a notification (by pasting some code into the console) from there. Do you get any errors?
I resolved it already. It turns out that I needed to remove the platform and add it again. Now it works. Thanks.
It worked perfectly for me, thanks.
I'm facing this error, I've tried to follow some steps that I found in some posts but it didn't solve it
FCMPlugin: Support for Gradle v4 or lower is deprecated. Please upgrade to a newer version.
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/
Notifications started working @michal-kroliczek @marutifh. I started using getInitialPushPayload() to retrieve the tapped notification.
cordova plugin remove cordova-plugin-fcm-with-dependecy-updated
cordova plugin add https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated --variable ANDROID_DEFAULT_NOTIFICATION_ICON="@mipmap/ic_launcher" --variable ANDROID_FCM_VERSION="23.0.0" --variable ANDROID_FIREBASE_BOM_VERSION="29.0.1" --variable ANDROID_GOOGLE_SERVICES_VERSION="4.3.4" --variable ANDROID_GRADLE_TOOLS_VERSION="4.1.0" --variable IOS_FIREBASE_MESSAGING_VERSION="~> 7.4.0"
Note: We are not simply removing and re-adding the plugin. We are adding marutifh's fork. Thanks guys
Hello bro i tried this forked but i have a problem, i am using ionic version 7 and FCM use @ionic-native/core when i install it then cant add ionic cordova platform add android@11
Project Info "@ionic/angular": "^7.0.0" "@angular/core": "^16.0.0" 11.0.0 (cordova-lib@11.1.0)
Can you help me please
any help?
Hello guys, as of android 13, target sdk 33, this fork is not working anymore, notifications are not received in android neither background nor foreground. I have already solved for android 12 with the below solution but after updating android to 13 the issue reappears again. Did anyone faced it with the new android version? and how can we solve it?
Notifications started working @michal-kroliczek @marutifh. I started using getInitialPushPayload() to retrieve the tapped notification.
cordova plugin remove cordova-plugin-fcm-with-dependecy-updated
cordova plugin add https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated --variable ANDROID_DEFAULT_NOTIFICATION_ICON="@mipmap/ic_launcher" --variable ANDROID_FCM_VERSION="23.0.0" --variable ANDROID_FIREBASE_BOM_VERSION="29.0.1" --variable ANDROID_GOOGLE_SERVICES_VERSION="4.3.4" --variable ANDROID_GRADLE_TOOLS_VERSION="4.1.0" --variable IOS_FIREBASE_MESSAGING_VERSION="~> 7.4.0"
Note: We are not simply removing and re-adding the plugin. We are adding marutifh's fork. Thanks guys
@alitalaee @eae1991 do you have any updates about this issue?
@alitalaee @eae1991 do you have any updates about this issue?
No updates at all on this issue, please if you find anything keep me posted thank you.
@alitalaee @eae1991 do you have any updates about this issue?
No updates at all on this issue, please if you find anything keep me posted thank you.
You can try this plugin https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated It works for Android 13 and target SDK 33 but if you using ionic v7 I created a fork which success for me: https://github.com/YaroslavG/cordova-plugin-fcm-with-dependecy-updated
@alitalaee @eae1991 do you have any updates about this issue?
No updates at all on this issue, please if you find anything keep me posted thank you.
You can try this plugin https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated It works for Android 13 and target SDK 33 but if you using ionic v7 I created a fork which success for me: https://github.com/YaroslavG/cordova-plugin-fcm-with-dependecy-updated
I am using ionic v4, and it's a hassle for me to upgrade to v7, your fork only works for ionic 7?
@eae1991 I think yes, you can try it. This also must work for ionic v4
After making changes suggested by marutifh in Pull Requests, Build goes successful but notifications not received. However, Token is received just fine. Tried via Firebase Console as well as API