Using the last version, 3.1.1, when the app is on the background, the registerNotificationReceivedBackground event is not fired.
The documentation says it's supported but it's not working (https://wix.github.io/react-native-notifications/docs/general-events#registernotificationreceivedbackground)
Notifications.events().registerNotificationReceivedBackground(
(
notification: Notification,
completion: (response: NotificationCompletion) => void,
) => {
console.log('Notification Received - Background', notification.payload);
// Calling completion on iOS with `alert: true` will present the native iOS inApp notification.
completion({
alert: false,
sound: false,
badge: false,
});
},
);
Besides this, the registerNotificationReceivedForeground event is working as expected.
@Moreno97 does registerNotificationReceivedBackground works when app is killed?
Hello @mikaarefyev, it's not working when the app is killed by the user. No events fired (though the notification is received correctly).
Hello @mikaarefyev, it's not working when the app is killed by the user. No events fired (though the notification is received correctly).
I checked in native code and seems guys didn't implement this method
For background push notifications (not cold start) this worked for me 445
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.
as @Moreno97 registerNotificationReceivedBackground isn't working as expected...
Same issue. Need solution.
@Moreno97 any updates ? this still seems to not work as intended