Hello!
The event listener that’s added through
Runtime:addEventListener("notification", notificationListener)
is run at many different occasions:
- App was inactive and the user clicked on the notification
- App was running and the event listener is automatically run when the event is recieved
- App was running and the user clicked on the notification
- App was completely shut down and the user clicked a notification (if manually run on startup like you recommend)
It’s of course great that you can interact with the event at several stages, but my problem is that it is impossible to differentiate the second and third event listeners. In both cases e.applicationState == “active”. Is there something that I am missing or is it really impossible to see the difference?
I need this feature because when a user taps on the notification I want to send them to a specific scene, but I don’t want to send them there automatically if they would happen to get a notification whilst doing something else.
Edit: This is how it works on Android, might differ slightly on iOS since I haven’t tested that as throughly yet.