This method sends me a notification mail when app is running but if the apps is not running, I can’t capture this event from a cold start. Is there a permission or something for this to work?
addNotificationResponseReceivedListener is only run when you interact with the notification. If you aren’t triggering this when tapping on a notification when the app is killed, you need to mount the listener earlier. The example snack in the docs is a good example and will work whether you are launching the app from a cold start or the background
I’ve tried that first, didn’t work. I need to send user to a route when they click on a notification, but the event listener don’t fire on android devices if the app is killed.
It did work as expected on ios.
Is this normal, or I need to update to expov42 as written down here?
The SDK 42 feature is for handling notifications while the app is backgrounded, I don’t think that’s what you’re trying to do here. If you had to move it outside of useEffect, then that means you’re taking too long to mount that listener. The example from the docs works so you can always work backwards from there
Hello, I´m trying to also use the notifications when the app (iOS) is in background but it does not work (they work when I’m inside the app, though), @alimertcakar do you put Notifications.addNotificationResponseReceivedListener as a function? I have it like this: