Notifications actions and data

Hi, I have 2 questions about notifications.

  1. Someone knows how to navigate to a specific screen by clicking on a notification?

  2. How to add more data to a notification, such as WhatsApp with messages received by the same user?

Thanks.

Here’s a similar topic that was posted a couple of days after yours: expo : how to open a particular page on click push notification

Thanks, I’ve already managed to do the navigation, but what I still don’t know is how to add information to the same notification as WhatsApp

Not sure what you mean when you say more information like Whatsapp. Could you explain in more detail?

When you receive new messages from WhatsApp, they are added to the same notification.

I want to do the same, add information to the same notification, and not generate new notifications every time a new message is sent

I hope to have explained. :sweat_smile:

Hey @emmanuelid,

There’s currently no way of replacing or updating the information in the same notification (at least that I’ve been able to find). What you can do if you’re targeting Android only is to remove all notifications and then send a new one.

Notifications.dismissAllNotificationsAsync()

I know this isn’t the answer you wanted, but I hope it helps. There may be options to replace contents of a notification like WhatsApp does if you eject from Expo and find a package that can do this for you. But then you’d have to eject, and that’s a big headache.

For now, I’m afraid you will have to live with multiple notifications.

I don’t know how it works on Android, but on iOS WhatsApp does not add new information to an already existing notification. However, the notifications (in the same conversation) are stacked so that you only see the most recent one. Is that what you’re referring to?

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