Satyam Dodmani
Satyam Dodmani

Reputation: 35

Getting duplicate notifications after app reinstall using "react-native": "0.74.1" & "@react-native-firebase/messaging": "^20.3.0". Need a fix

I have found similar queries on the internet but I am not able to find the right answer for my scenario.

Say I have a app and a single user have multiple devices of same type (say: iOS). Now I am registering the device on the the backend by generating a token and saving it to the backend (appending it the existing list if any exist). The problem that I am facing is If I uninstall the app and reinstall the app then there are two active token s for a single device. So, I am able to see duplicate notifications. That means the previous token is still active even after uninstalling the app.

I have tried adding the UUID but even that changes for every app install. So I am not able to get the unique identifier for that device. I am expecting the app to behave in this manner. A single user can have multiple device of same type and have app installed on all of it(Have a token). Even if I un-install and reinstall it should replace the previous token with the new token so as to maintain the sanity of the tokens and to avoid the duplicate notification.

Upvotes: 0

Views: 66

Answers (0)

Related Questions