-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android deeplink support (send notifications with URI on Android devices) #60
Conversation
How can I capture the notification when the app is closed?, and thus be able to refresh cache for example |
How to catch a push notification on iOS if the application was previously destroyed? I want to open another event |
where to process a push if the application is closed? |
NotifierManager.addListener does not work when the application is killed |
Yes, the question arose what does it do if the application is killed |
This library does not work when the app is killed/closed. Only works when it's in foreground. Took me a while to figure this out. |
@ubarua123 that's not true completely. Well both yes, and no On Android this is how it works: If you send both notification and data type message, or just notification type message, then you are right when app is in background listener will not be called. If you want listener to be called when app is in background or killed, you need to send only data type message, that way listener will be called when app is in background. This is how it works from Firebase side. When you try to test push notificaiton from firebase console it will attach notification type message. So solution would be sending push notification using api, and sending only data type message. You can use this file to test your notification and in the script remove notification title, and body part and send only data type message: Related stackoverflow issue: https://stackoverflow.com/questions/37358462/firebase-onmessagereceived-not-called-when-app-in-background From ios side I still need to investigate a bit : but you can check comments in this issue as well: #24 |
Solves: #52
In order to setData for Intent on Android Devices, you just need to put URI value with "URL" key into payloadData (after converting URI toString). If payload data contains value with "URL" key then intent data will be set internally.
Example code: