react-native-notifications
react-native-notifications copied to clipboard
registerNotificationReceivedBackground listener not triggered on Android when App is in background
There are several stale tickets for that like:
- https://github.com/wix/react-native-notifications/issues/883
- https://github.com/wix/react-native-notifications/issues/905
But it is still happening. Is this repo dead or what?
From what I have learned so far:
THIS LIBRARY DOESN'T SUPPORT HANDLING BACKGROUND NOTIFICATIONS FROM JS ON ANDROID WHEN APP IS CLOSED
More details
- Android restricted starting activities from background at some point.
- This lib doesn't use Headless Js to run JS code in background, so background handler will never run when app closed, because activity that launches RN is not started.
This library needs update to support that.
How to fix for now:
Use @react-native-firebase/messaging lib that uses Headless Js and can handle background messages.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
The issue has been closed for inactivity.