React-native-notifications: When the app is on the background, the "registerNotificationReceivedBackground" event is not fired

Created on 3 Feb 2020  路  9Comments  路  Source: wix/react-native-notifications

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.

馃彋 stale

All 9 comments

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mimble-Wimble picture Mimble-Wimble  路  3Comments

Lastin picture Lastin  路  5Comments

WhereBeTheDan picture WhereBeTheDan  路  5Comments

VRBitman picture VRBitman  路  6Comments

codoffer picture codoffer  路  5Comments