How to find invalid tokens in Firebase topic registration

Viewed 288

I have an android app that uses firebase to handle and send push notifications. When an user logs-in, it is automatically subscribed to a topic in firebase and saved the token in my database.

If after logging into the app, the users uninstall the app, their token is still in firebase, subscribed to the topic. If firebase call sendToTopic("topic"), probably will fails due this invalid token.

There is any way to get notified about those invalid tokens? I need those tokens to unsubscribe it from the topic and remove it from my database.

0 Answers
Related