When click on noification from the tray getInitialNotification is triggered but notificationOpen param gets null value.
I am sending notification via firebase console. If my app is in foreground I receive my notification data that I am sending. But if my app is in background or app is killed, I receive notification but when I tap on notification, the value of openNotification is null.
This.is what I am doing.
firebase.notifications().getInitialNotification()
.then((notificationOpen: NotificationOpen) => {
console.log('Notification closed')
console.log(notificationOpen)
if (notificationOpen) {
// App was opened by a notification
// Get the action triggered by the notification being opened
const action = notificationOpen.action;
// Get information about the notification that was opened
const notification: Notification = notificationOpen.notification;
}
})