Does Instance ID service initiate callback onTokenRefresh() on app upgrade?

前端 未结 1 790
后悔当初
后悔当初 2021-01-26 04:03

Does Instance ID service initiate callback onTokenRefresh() on app upgrade?

Reference doc states that \"Tokens are unique and secure, but your app or the Instance ID se

相关标签:
1条回答
  • 2021-01-26 04:42
    1. onTokenRefresh() only triggers for specific reasons, where updating the app isn't one of them. See my answer here.

      The link you mentioned in the comments is the deprecated way of generating a registration token (GCM2/waaay old GCM), which is different from InstanceID generated tokens (preFCM and FCM). See Ian Barber's answer here.

    2. I'm not sure what you're asking here. The way I understand the flow is FCM identifies if the token needs to be refreshed, if yes, it calls upon the InstanceID service (separate from the client) to generate a new one. As soon as it generates the token and the app goes online, it would trigger onTokenRefresh() to let you know of the new token. What you do with the token depends on you.

    Simple as that. No special scenarios AFAIK.

    0 讨论(0)
提交回复
热议问题