实例ID在清除应用程序数据时不会失效 [英] Instance ID not invalidated when clear application data
问题描述
我用实例ID API
实现了 GCM 3.0
,以便使用应用程序
和 GCM
服务器。
这是 GCM的实例ID API 文档当用户直接卸载应用程序而无需注销时, GCM 给出 没有注册
错误的设备与应用程序卸载。
我要做的是删除无用设备标识标记
来自应用程序服务器
,因为我已经尝试了卸载应用程序,然后实例标识
被更改,但当用户清除应用程序数据时,则新实例ID
将与先前实例ID
相同。
while Android GCM
文档说:
实例ID是稳定的,但可能会失效,如果:
- 应用程序删除实例ID
- 设备出厂重置
- 用户卸载应用程序
- 用户清除应用程序数据
是否有特殊原因?
如Google所说,实例ID 可能 b
以下是我在使用GCM时的发现,
- 在大多数情况下清除应用程序不会更改实例ID,当你调用getToken()时。
- 所有消息和主题消息将被传递并显示,尽管应用程序已被清除,并且没有再次打开(no getToken()称为)。
I have implemented GCM 3.0
with Instance ID API
for sending push notification to application using Application
and GCM
server.
Here is Instance ID API for GCM documentation which i am referring.
When User direcltly uninstall application without logout then GCM
gives "Not Registered"
error for devices with the app uninstalled.
What i have to do is to remove useless Device id tokens
from Application server
for that i have tried with Uninstall of application then Instance ID
is changed but when application data is cleared by User then new Instance ID
will same as previous Instance ID
.
while Android GCM
documentation says:
Instance ID is stable but may become invalid, if:
- App deletes Instance ID
- Device is factory reset
- User uninstalls the app
- User clears app data
is there any particular reason for this?
As Google says, "Instance ID MAY become invalid if ...".
Here is my findings while using GCM,
- Clearing an app in most cases doesn't change the instance ID, when you call getToken().
- All messages and topic messages will be delivered and shown, although the app is cleared and you didn't open in again (no getToken() is called).
这篇关于实例ID在清除应用程序数据时不会失效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!