navigation not working using push notifications when app is closed

Please provide the following:

  1. expo sdk:“expo”: “~48.0.18”:
  2. for:ios/android:
  3. problem with:expo notifications.

i am using expo notifications on expo go . when my app is running and I send a notification to my app and i click on it ,the app navigates to my desired screen but navigation doiesnt occur when app is closed . i have tried many ways but doesnt work
useEffect(() => {
registerForPushNotificationsAsync()
.then((token) => {
setExpoPushToken(token);
return AsyncStorage.setItem(“DeviceToken”, token);
})
.then((i) => console.log(“Token Done”, i))
.catch((e) => console.log(“token Error”, e));

notificationListener.current =
  Notifications.addNotificationReceivedListener((notification) => {
    navigate("ChatScreen", {
       nexists: response.notification.request.identifier,
     });

    setNotification(notification);
  });

responseListener.current =
  Notifications.addNotificationResponseReceivedListener((response) => {
     navigate("ChatScreen", {
       nexists: response.notification.request.identifier,
     });
  });

return () => {
  Notifications.removeNotificationSubscription(
    notificationListener.current
  );
  Notifications.removeNotificationSubscription(responseListener.current);
};

}, );

as i said it navigates when app is running but now when app is closed. i have created apk too but still doesnt work .,i hope someone can help me

Same issue here

Did you find a solution?
It works using “rn-firebase”:

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