Open bilisim1995 opened 5 years ago
I have the same problem as this.
couldn't find a solution to the issues
Similar issues have been opened and closed multiple times.
Sort of solution: The short answer is that due to changes in firebase vs GCM, and policies on what backgrounded apps may and may not do, you must put everything from your payload into the data block, and get rid of the notification block.
Why this doesn't work:
If you use FCM to send to iOS, your iOS notifications will now break.
Real solution:
This plugin must be updated to allow developers to register intents and use the click_action
key of the FCM plugin. This is the new and modern way of acting on notification clicks in Android, and the plugin currently does not support it.
Similar issues have been opened and closed multiple times.
Sort of solution: The short answer is that due to changes in firebase vs GCM, and policies on what backgrounded apps may and may not do, you must put everything from your payload into the data block, and get rid of the notification block.
Why this doesn't work:
If you use FCM to send to iOS, your iOS notifications will now break.
Real solution:
This plugin must be updated to allow developers to register intents and use the
click_action
key of the FCM plugin. This is the new and modern way of acting on notification clicks in Android, and the plugin currently does not support it.
I already have this. I fixed the problem for this by setting the fcm version in gradle to 15.0.0 manually.
The correct fix is for this project to accept #2369.
I already have this. I fixed the problem for this by setting the fcm version in gradle to 15.0.0 manually.
How did you do this?
The correct fix is for this project to accept #2369.
I will try this. Thanks for reply
The correct fix is for this project to accept #2369.
I will try this. Thanks for reply
Does it work in your case?
Expected Behaviour
foreground -> pushObject.on(‘notification’).subscribe((notification: any) is called
background -> pushObject.on(‘notification’).subscribe((notification: any) is not called, show default notoication
Coldstart always false..
Platform and Version (eg. Android 8.1)
Android 8.1
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
General Mobile GM8
Cordova CLI version and cordova platform version
Ionic:
ionic (Ionic CLI) : 4.1.2 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.1
Cordova:
cordova (Cordova CLI) : 7.1.0 Cordova Platforms : android 7.1.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.4, (and 12 other plugins)
System:
Android SDK Tools : 26.1.1 (/home/oguzhan/android-sdk-linux) NodeJS : v8.11.3 (/usr/local/bin/node) npm : 6.5.0 OS : Linux 4.15
Plugin version
Sample Push Data Payload
const payload = {
Notification code
pushObject.on('notification').subscribe((notification: any) =>{ console.log(notification);