Ad

Firebase: Add Device Token ID To All Old Users

I have published an android app that uses Firestore for the database. Now, I want to enable push notifications.

I have figured out I need to attache a device token id for each user to send notification to a specific device. The problem is that I have lots of old users! Is there anyway to add token id for each one instead of waiting for all users to upgrade the app?

Ad

Answer

The only way you can collect device tokens is from the device itself. So, your users will have to upgrade their app to version that collects the tokens, associates it with the user, and writes it to Firestore.

Ad
source: stackoverflow.com
Ad