Please provide the following:
- SDK Version: 36
- Platforms(Android/iOS/web/all): Android
Hi all , We are having issue with android notification when app was closed. Notification callback is not getting fired , it is registered in componentDidMount. It is fired on next tick.
Expo documentation also has this in comments.
// Handle notifications that are received or selected while the app
// is open. If the app was closed and then opened by tapping the
// notification (rather than just tapping the app icon to open it),
// this function will fire on the next tick after the app starts
// with the notification data.
code for registering event.
handleNotification is registered , when app was closed and opened by taping on notification , but not fired.
On next notification , it is getting triggered/fire.
componentDidMount() {
this._notificationSubscription = Notifications.addListener(this._handleNotification);
}
Is this the default behavior , or it should trigger the call back function from componentDidMount , after adding listener.?
On iOS , after it adds listener , it also triggers the event , and works as expected.
Can someone please help ? We are blocked on this to do production release and highly appreciate any help/feedback or suggestions.
Thanks.