Replies: 1 comment
-
I would try logging the "data" field specifically. I think what you are seeing is rather an issue of log formatting than an issue with the actual data. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
data is undefined after notification pressed for react native with firebase push notification using notifee library,
navigation is correctly triggered, but once the notification pressed notification response does not have the required route field, it is getting undefined,
notification response from server as below before notification is pressed
A new FCM message arrived! {"notification":{"android":{"color":"#324398"},"body":"New Notification","title":"amazing Survey 123"},"sentTime":1692876074215,"data":{"category_name":"Survey category","route_name":"SurveyDetailScreen","route":"125","type":"survey"},"from":"460568428430","messageId":"0:1692876074222868%ba18e656ba18e656","ttl":2419200,"collapseKey":"com.elearning"}
once the notification pressed i am returning foreground notification response but it is as below, data is empty array object.
{"detail": {"notification": {"android": [Object], "body": "New Notification", "data": [Object], "id": "ploT1wsSPtQT0kp5oUcm", "title": "amazing Survey 123"}}, "type": 1}
i will give react native code for notification listener
`
const notificationListener = () => {
messaging().onNotificationOpenedApp((remoteMessage) => {
console.log(
"Notification caused app to open from background state:",
remoteMessage.notification
);
});
};
`
Beta Was this translation helpful? Give feedback.
All reactions