How to Find Invalid Tokens in a Firebase Theme Registration

I have an Android app that uses firebase to process and send push notifications. When a user logs in, he automatically subscribes to a topic in firebase and saves the token in my database.

If, after entering the application, users delete the application, their token is still in firebase, subscribes to this topic. If the firebase call is likely sendToTopic("topic")to fail due to this invalid token.

Is there a way to get notified of these invalid tokens? I need these tokens to unsubscribe from this topic and remove it from my database.

+4
source share

Source: https://habr.com/ru/post/1688842/


All Articles