在什么情况下应用程序会删除Firebase实例ID? [英] Under what circumstances will an app deletes Firebase Instance ID?

查看:360
本文介绍了在什么情况下应用程序会删除Firebase实例ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

FirebaseInstanceIdService.class 明确指出那么 onTokenRefresh()将在下列情况下被调用:
$ b


  • 应用程序删除实例ID li>
  • 应用程序在新设备上恢复

  • 用户卸载/重新安装应用程序
  • 用户清除应用程序数据
  • li>


什么时候应用程序删除实例ID?当应用程序仍然处于活动状态(正在进行的活动或服务)时,是否有可能发生这种情况?

解决方案

当您致电 FirebaseInstanceId.deleteInstanceId() 在应用程序中:
$ b


重置实例ID和撤销所有的令牌。

是的,您可以在您的应用程序处于活动状态时调用此方法。


FirebaseInstanceIdService.class clearly states that onTokenRefresh() will be called when:

  • App deletes Instance ID
  • App is restored on a new device
  • User uninstalls/reinstall the app
  • User clears app data

When and under what circumstances will an app deletes an instance ID? Is there a possibility of it happening while an app is still active (ongoing activity or service)?

解决方案

The app deletes the Instance ID when you call FirebaseInstanceId.deleteInstanceId() in app:

Resets Instance ID and revokes all tokens.

And yes, you can call this method while your app is active.

这篇关于在什么情况下应用程序会删除Firebase实例ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆