wix / react-native-notifications

React Native Notifications
MIT License
3.23k stars 763 forks source link

Background notification completion callback #871

Closed georgeflug closed 2 years ago

georgeflug commented 2 years ago

I am using the registerNotificationReceivedBackground() event to receive background notifications.

According to the documentation, the completion callback should be called with a payload such as {alert: true, sound: true, badge: false}. However, that does not match the Typescript types, and diving into the code, it wants a payload with a NotificationBackgroundFetchResult value of newData, noData, or failed.

Can someone explain what these values mean so that I know which one to provide in the callback?

Thank you in advance.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

SandraHicks commented 2 years ago

I am just right now asking myself the same question. Also, there is no explanation what the enum values mean. To my mind, the documentation version makes much more sense. Could someone please explain how to use it correctly?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 2 years ago

The issue has been closed for inactivity.

NivardoX commented 2 years ago

Makes little sense to me, and I see it nowhere in the docs. @DanielEliraz perhaps you could shed some light on this?

Thank you in advance.