I have an Expo standalone app and I am sending Push Notifications from my server. I have a notification listener in my App.js componentDidMount like so.
componentDidMount = () => {
this._notificationSubscription = Notifications.addListener(this._handleNotification);
}
The handler gets called when my app is running in the foreground or background.
However, when my app is not running (not even in background) and the notification is delivered, on tapping the notification the app opens but the handler is not called.
It seems to me that the listener registration is "too late".
My notification has a useful payload that I want to use in the app, but unless the app is running, it is lost in this "cold start" case.
Is there a way to preserve this notification data on cold start and call this listener?
