I use the Firebase Device group to notify all user devices. https://firebase.google.com/docs/cloud-messaging/android/device-group
To stop notifications on the device, I call:
FirebaseInstanceId.getInstance().deleteInstanceId();
(see https://developers.google.com/android/reference/com/google/android/gms/iid/InstanceID )
The token is well removed / invalid for reporting a unique device, if I notified the device using the firebase console, we received an error message. However, the token is not deleted / invalid from the firebase device group. If we notify the firebase user group, this device will still be notified.
I also tried removing the token with the HTTP request (first link) in the device group and it works. But if the user leaves offline mode and deletes the application data, I have no way to get the previous user group FCM token to cancel the current FCM token.
Do you have any tips? Thanks.
source share