Please provide the following:
- expo sdk:“expo”: “~48.0.18”:
- for:ios/android:
- 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