evollu / evollu/react-native-fcm

Android issue. App doesn't receive notification in unloaded(killed) state

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

Description

RN: 0.42.0
react-native-fcm: 7.4.0
Android

When the application is in the unloaded state my event handler doesn't trigger.

This is my code:

```javascript
addPushNotificationReceivedEventListener (handler) {
const isIOS = this.isIOS()
if (handler) {
return FCM.on(FCMEvent.Notification, n => {
setTimeout(() => { handler(n) }, 500)

if (isIOS) {
switch (n._notificationType) {
case NotificationType.Remote:
n.finish(RemoteNotificationResult.NewData)
break
case NotificationType.Local:
n.finish()
break
case NotificationType.NotificationResponse:
n.finish()
break
case NotificationType.WillPresent:
n.finish(WillPresentNotificationResult.All)
break
}
}
})
}
return null
}
```

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.