evollu / evollu/react-native-fcm

FCM.on(FCMEvent.Notification, async (notif) is not triggered when app is killed

Open
#670 17 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.7k
Forks
661
PR merge metrics
No merged PRs in 30d

Description

When openning an issue, please include following information for better support

1. What version of RN and react-native-fcm are you running? RN: 0.48.4 FCM: 9.6.2
2. What device are you using? Android
3. Is your app running in foreground, background or not running? Working fine in foreground

Question.

I have added FCM Listener in my Main class. The event is triggered well in foreground but it doesn't get triggered when the app is killed. Can you give me any advise?

```
componentWillMount() {
this.notificationListener = FCM.on(FCMEvent.Notification, async (notif) => {
if(notif.local_notification){
//this is a local notification
}
if(notif.opened_from_tray){
console.log('opened from tryay');
}
}

componentWillUnmount() {
// Empty
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.