Notification Body when android is open

#1

i’m using expo push notication and its working well when the app is close. When i try to access the body notification with the app running the content is null.

constructor(props){
this._notificationSubscription= Notifications.addListener(this._handleNotification);
}

_handleNotification =(notification)=>{
console.log(notification)

alert(JSON.stringify(notification))

};

the console shows
Object {
“data”: null,
“isMultiple”: false,
“notificationId”: -1052549478,
“origin”: “received”,
“remote”: true,
}

how to access the Data of notification when the app is open ? Thanks

closed #2

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.