bug(cloud-messaging): not getting body payload when app is background
See original GitHub issuePlugin(s):
“@capacitor-firebase/authentication”: “^0.3.1”, “@capacitor-firebase/messaging”: “^0.3.1”, “firebase”: “^9.8.3”,
Platform(s):
Android
Current behavior:
I see background notification messaging service. It is already implemented. I am not getting the body payload when app is in background but I do get the notification.
Expected behavior:
It should have other body payload too
Steps to reproduce:
Related code:
insert short code snippets here
Other information:
Capacitor doctor:
Capacitor Doctor
Latest Dependencies:
@capacitor/cli: 3.6.0
@capacitor/core: 3.6.0
@capacitor/android: 3.6.0
@capacitor/ios: 3.6.0
Installed Dependencies:
@capacitor/ios: not installed
@capacitor/cli: 3.5.0
@capacitor/core: 3.5.0
@capacitor/android: 3.5.1
[success] Android looking great! 👌```
Issue Analytics
- State:
- Created a year ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
bug(cloud-messaging): not getting body payload when app is ...
Current behavior: I see background notification messaging service. It is already implemented. I am not getting the body payload when app is in ......
Read more >Firebase onMessageReceived not called when app in ...
As per Firebase Cloud Messaging documentation-If Activity is in foreground then onMessageReceived will get called. If Activity is in background or closed ...
Read more >Receive messages in an Android app - Firebase - Google
Notification messages delivered when your app is in the background. ... Messages with both notification and data payload, when received in the background....
Read more >Firebase Cloud Messaging for Android: Sending Push ...
A method to connect your mobile app with the Firebase console. The difference between receiving messages in the foreground and background of ...
Read more >Push Notifications with Firebase in React.js
This includes when the application is active or inactive or not open in the browser and when the browser is inactive. Firebase Cloud...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks a lot for your suggestion 😃, and It is working
If I understand docs correctly overriding onMessageRecieved won’t help you if you are sending a notification to background app as it’s simply not called. see: https://firebase.google.com/support/faq/#fcm-android-background or table I linked before. If all you need to do is have body information place it in data object of cloud message payload too, not only in notification.body