React-native-notifications: Can I register to foreground notification without showing notification?

Created on 5 Mar 2020  路  6Comments  路  Source: wix/react-native-notifications

Is it possible to register to foreground notification without showing a notification to the user?

馃彋 stale

Most helpful comment

i

yes. You can use

Notifications.events().registerNotificationReceivedForeground((notification: Notification, completion: (response: NotificationCompletion) => void) => {
completion({ alert: false, sound: false, badge: false });
})

it is not working.

All 6 comments

yes. You can use

Notifications.events().registerNotificationReceivedForeground((notification: Notification, completion: (response: NotificationCompletion) => void) => {
completion({ alert: false, sound: false, badge: false });
})

i

yes. You can use

Notifications.events().registerNotificationReceivedForeground((notification: Notification, completion: (response: NotificationCompletion) => void) => {
completion({ alert: false, sound: false, badge: false });
})

it is not working.

I would also love to figure this out. The solution presented above also didn't work for me.

@beulahpt , that solution just work for iOS. I have the same problem.

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.

Was this page helpful?
0 / 5 - 0 ratings