How can I know that a Firebase Cloud Messaging token is out of use?
NickName:Eric Ask DateTime:2016-11-21T00:41:14

How can I know that a Firebase Cloud Messaging token is out of use?

A single user can have multiple devices connected to his account. Because of that he can have multiple cloud messaging tokens. Everytime the user opens the app the token from that device is send to the app server and saved there.

What happens if a user uninstalls the app from one of his devices? I have no chance to tell the server that the token is not longer in use. Can it occure that I notify an other user instead since this other user has acquired the not longer used token from the original user?

Copyright Notice:Content Author:「Eric」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/40706603/how-can-i-know-that-a-firebase-cloud-messaging-token-is-out-of-use

Answers
AL. 2016-11-22T05:33:03

\n What happens if a user uninstalls the app from one of his devices?\n\n\nUsually, when your app is uninstalled, it is advisable for you (the developer) to automatically make sure that the corresponding registration token is deleted from your own App Server.\n\n\n Can it occure that I notify an other user instead since this other user has acquired the not longer used token from the original user?\n\n\nNo. Each registration token is unique per each app instance. So rest assured that if a registration token is invalidated/expires for whatever reason, no other user will be able to use it. Sending a message to an invalid/expired registration token will result to a NotRegistered error.",


More about “How can I know that a Firebase Cloud Messaging token is out of use?” related questions

How can I know that a Firebase Cloud Messaging token is out of use?

A single user can have multiple devices connected to his account. Because of that he can have multiple cloud messaging tokens. Everytime the user opens the app the token from that device is send t...

Show Detail

How can I get the token from Firebase Cloud Messaging on iOS

Podfile target 'T' do use_frameworks! pod 'Firebase/Core' pod 'Firebase/Messaging' pod ‘Firebase’ pod ‘Firebase/Auth’ pod 'Firebase/Database&#

Show Detail

How to get a registration token for Firebase Cloud Messaging without requesting permission for notifications?

My end goal here is to subscribe web clients to topics in Firebase Cloud Messaging to receive simple data push events, partitioned by keys. Via this question, that seems to be possible, but only if...

Show Detail

Firebase Cloud Messaging Unable to Get Token on Vue 3

I am creating an App that will get real time notification with firebase cloud messaging, but it seems does not work for me. I am following their documentation an put firebase-messaging-sw.js in roo...

Show Detail

Firebase, requestPermission; Uncaught SyntaxError: Unexpected token in Web Cloud Messaging

I am just beginning to use the Firebase Web Cloud Messaging and stumbled upon an issue where I can not proceed. The cloud messaging is integrated with a Tizen Web application(Samsung device applic...

Show Detail

Can I use Firebase Cloud Messaging for mobile browser?

I've been using Firebase Cloud Messaging for desktop browser via the FCM JavaScript API. Does anyone know if this can be used for mobile browsers? Been running into difficulties when trying to ge...

Show Detail

Where can i find client token ID on Firebase Cloud Messaging?

I try to find simple client-server app using Firebase Cloud Messaging. I use Nodejs and this package, but I don't know how and where I can find the client token? Here the example code: var fcm =

Show Detail

How to save firebase cloud messaging tokens?

Im trying to use firebase cloud messaging to enable push notifications on my PWA. but i can't figure out how to save tokens after the 'user' click on 'accept' on the push notification subscription

Show Detail

Can I call methods on Firebase Cloud Messaging to send a new token?

Can I call methods on Firebase Cloud Messaging to send a new token? I want to make the ability to update the token myself.

Show Detail

firebase cloud messaging with react native?

I have a react native project that is already connected to my firebase project. I use firebase as my database. Everything works great. But... I am trying to get a simple firebase cloud messagin...

Show Detail