How to remotely update/remove notifications?

I am developing a messaging app.
When my app is closed and I receive a message, my backend sends a push notification to my phone.
Let’s say 1 minute later I receive another message from the same person. And again, and again, and again.

Result: I have as many notifications as messages received. I can’t do anything about it from my react-native code because the app is closed, so I am unable to listen for incoming notifications.

When I use whatsapp or messenger, even if the app is closed, the same use case would produce the following:

  1. John Smith : “Hey how are you?”
  2. John Smith : “2 messages”
  3. John Smith : “3 messages”
    and so on.

How can I remotely change “Hey how are you?” to “2 messages”, or, how can I listen for incoming notifications while my app is closed?

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