Android Issue - when the app is killed, the callback function not triggered when click on notification
See original GitHub issueHey,
In Android, when the i click on the notification and the App is killed, the callback function doesn’t triggered.
I did follow all the steps, and all the other staff works good - when the app is in foreground/background the callback triggered fine.
Code:
`FCM.on(FCMEvent.Notification, async notif => { //Not triggered when user click, but does trigger when receive notification (When app killed) if (notif.opened_from_tray) {
console.log(`user clicked on notification`);
} });`
RN version: “0.48.3” react-native-fcm version: “9.1.0” device: Android nexus 5x emulator. App is killed - not running.
Advanced: The message does delivered, and i see the logs - but when click the notification it’s like everything reset.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Firebase push notifications callback doesn't work when app is ...
I resolved this by using the .getInitialMessage() function (This is the callback if the app is terminated. My notifications worked when the ...
Read more >NotificationListenerService - Android Developers
VERSION_CODES#N onward all callbacks are called on the main thread. Prior to N, there is no ... LOLLIPOP this method will no longer...
Read more >On IOS when the app is closed, when clicking on a received ...
FYI: I have tested official SFMC learning app and looks like sfmc_handleURL callback won't be called when iOS app is not running (killed) ......
Read more >expo-notifications dont work when app is not working.
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...
Read more >flutter_local_notifications | Flutter Package - Pub.dev
If they haven't, then these actions may be selected by the user when an app is sleeping or terminated and will wake up...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
oh. your issue is when you open the app by clicking the notification, you don’t see the notif? THAT notif that launchers the application will be in
await FCM.getInitialNotification()
cool