Please provide the following:
- SDK Version: 41
- Platforms(Android/iOS/web/all): all
- Add the appropriate “Tag” based on what Expo library you have a question on.
I’m having an issue with standalone apps, I’m trying to navigate the user after tapping on a notification that was sent to the device and everything works except when app is completely closed it crashes.
here is my code snippet for setting up notis:
** const lastNotificationResponse = Notifications.useLastNotificationResponse();
useEffect(() => {
if (
lastNotificationResponse &&
lastNotificationResponse.notification.request.content.data &&
lastNotificationResponse.actionIdentifier === Notifications.DEFAULT_ACTION_IDENTIFIER
) {
if (lastNotificationResponse.notification.request.content.data.NotificationType === 'Escalation' || lastNotificationResponse.notification.request.content.data.NotificationType === 'Message')
{
Navigation.navigate('RequestDetails', {
id: lastNotificationResponse.notification.request.content.data.Identifier,
number: 0,
title: 'New Request',
status: RequestStatus.New,
});
}
else {
Navigation.navigate('Tabs', {
screen: 'Home',
params: { scheduleOpen: true },
});
}
}}, [lastNotificationResponse])
**
under my navigation.navigate method I wait for the navigator isReadyRef to be ready before pushing so I know the issue is not with the navigator -
any suggestions?