GCM删除应用程序,并重新安装。多个通知 [英] GCM deleting app and reinstalling. Multiple Notifications

查看:97
本文介绍了GCM删除应用程序,并重新安装。多个通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正与GCM和我存储的注册ID在共享 其中应用程序被安装在该装置的preferences。当我知道 卸载应用程序,并重新安装着,当然,另外一个注册ID 被生成并被发送给服务器。所以,现在有一个新的注册 标识存储在设备上。在服务器上现在有两个注册 ID是旧的和新的。

I am working with GCM and i store the registration id in the shared preferences of the device where the app is installed on. When i know deinstall the app and reinstall it, ofcourse, another registration id is generated and sent to the server. So now there is a new registration id stored on the device. On the server there are now two registration id's the old and the new.

当我知道从服务器发送通知到手机手机 而不仅仅是得到两个消息(用于鲈注册ID)。

When i know send a notification from the server to the phone the phone gets two messages and not just on (for the lates registration id).

为什么GCM仍然使用旧的注册ID及设备?

Why can GCM still reach the device using the old registration id?

推荐答案

下面是你的问题<一个答案href="http://stackoverflow.com/questions/16320549/unregistering-and-re-registering-for-gcm-messages-causes-two-regids-to-be-valid">Unregistering并重新注册为GCM的消息引起两个REGID的是有效的。难道这是故意的吗?

使用一个唯一的标识符,每一个设备,如果一个新的注册ID是从设备接收简单地覆盖它。

Use a unique identifier for each device and if a new registration id is received from that device simply overwrite it.

这是你将如何得到的唯一标识符。

This is how you will get the unique identifier.

http://android-developers.blogspot.mx/2011/03/identifying-app-installations.html

这篇关于GCM删除应用程序,并重新安装。多个通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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