You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an angular application deployed as PWA, iOS and Android app (Capacitor). This app rely on Firebase Cloud Messaging for push notification:
In android, I test this with the FCM console, and, as you can see from this console.log:
in the pushNotificationReceived event handler, I've title, body and data fields from the notification.
But when the notification is tapped (e.g. when the app is closed), I lose its informations, as you can see from this console.log in pushNotificationActionPerformed event handler:
Inside the "data" field I have no more info about the original push notification.
This happens only with android, iOS has 'gcm.notification.data' object and PWA 'body' object. where I can find all the info I need.
What am I missing in order to get those info also in android?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
"@angular/animations": "~11.0.0",
"@angular/cdk": "^11.2.13",
"@angular/common": "~11.0.0",
"@angular/compiler": "~11.0.0",
"@angular/core": "~11.0.0",
"@angular/forms": "~11.0.0",
"@angular/localize": "~11.0.0",
"@angular/material": "^10.1.3",
"@angular/material-moment-adapter": "^12.1.1",
"@angular/platform-browser": "~11.0.0",
"@angular/platform-browser-dynamic": "~11.0.0",
"@angular/router": "~11.0.0",
"@angular/service-worker": "~11.2.14",
"@capacitor-community/facebook-login": "^3.1.1",
"@capacitor/android": "^3.1.1",
"@capacitor/app": "^1.0.2",
"@capacitor/cli": "^3.1.1",
"@capacitor/core": "^3.1.1",
"@capacitor/geolocation": "^1.0.2",
"@capacitor/ios": "^3.1.2",
"@capacitor/keyboard": "^1.0.2",
"@capacitor/push-notifications": "^1.0.3",
"@capacitor/storage": "^1.0.3",
I have an angular application deployed as PWA, iOS and Android app (Capacitor). This app rely on Firebase Cloud Messaging for push notification:
In android, I test this with the FCM console, and, as you can see from this console.log:
in the pushNotificationReceived event handler, I've title, body and data fields from the notification.
But when the notification is tapped (e.g. when the app is closed), I lose its informations, as you can see from this console.log in pushNotificationActionPerformed event handler:
Inside the "data" field I have no more info about the original push notification.
This happens only with android, iOS has 'gcm.notification.data' object and PWA 'body' object. where I can find all the info I need.
What am I missing in order to get those info also in android?
Beta Was this translation helpful? Give feedback.
All reactions