Skip to content

Not getting _data object in onNotificationOpened during foreground #3005

Closed
@Murugeshrockey-RN

Description

@Murugeshrockey-RN

Platform: Android and IOS

Lib Package Version: "react-native-firebase": "^5.5.6",

React Native Version: "react-native": "0.60.5",
CODE:
this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen) => {
console.log('output',notificationOpen)
});
Here the input send from backend side.

URL:https://fcm.googleapis.com/fcm/send
Input: {
"to":"c9kHZZSbReU:APA91bHafZuEi7JrDFM5WrGUHLl4MPrbBd6T_XwauMz5ff-cGViOfrJ8AYSn_pgOh-01-F56Nc0qxlfXZwsS5chZo7uBVOdNM8_g9i1S_f8Nr0XI-Iv6t0oN0LvrkPVRfruXwOm7LstE",
"data" : {
"body" : "Welcome to Zark",
"title": "Zark Gaming",
"target_screen":"notification"
},
"notification" : {
"body" : "Welcome to Zark",
"title": "Zark Gaming"
}
}

Getting payload data on onNotificationOpened when tap the notification when app is from background but not getting payload data when tap the notification from foreground. So I can't able pass the data or setting target_screen during foreground.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions