Dismiss individual remote notification

I’m building an app on SDK 38. I am currently using the LegacyNotifications API but I think this applies to the new one as well.

My app connects users to our service. In our service, users can receive documents. When a user receives a document, we send a push notification from our server to the user’s device.

I would like to make it so that if the user views the document, it clears any push notifications that are related to that document.

The API has a method Notifications.dismissNotificationAsync(localNotificationId), but that seems to only work with local notifications, not remote notifications. The object I get in Notifications.addListener(notification => { /* ... */ ); does not have any kind of notificationId when I receive a notification from the server.

How can I dismiss a certain notification that was sent from the server?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.