You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I'm using Notifee to display notification and firebase FCM is my backend.
When app is in Foreground state I'm able to access data payload, based on that i can navigate to specific pages, but when app is in Background and in Kill mode when user tap on the notification, the app is getting open but data payload comes as empty.
Currently I'm using Notifee to display notification and firebase FCM is my backend.
When app is in Foreground state I'm able to access data payload, based on that i can navigate to specific pages, but when app is in Background and in Kill mode when user tap on the notification, the app is getting open but data payload comes as empty.
So not able to navigate to specific screen
backend code
`try {
console.log("Sending message to token", token);
const response = await fcm.sendEachForMulticast({
tokens: [token],
data: {
notifee: JSON.stringify({
body,
title,
data: { screen: "screen-name" },
}),
data: JSON.stringify({ screen: "screen-name" }),
},
} catch (error) {
console.error("Error sending message:", error);
}`
I'm handling in frontend in the below manner
`const setupListeners = () => {
handleForegroundEvents(); //wrote onTap press actions
};
useEffect(() => {
requestUserPermission();
setupListeners();
}, []);
`
The text was updated successfully, but these errors were encountered: