所以我有一种情况,根据我对注册的理解,我认为不会发生我的理解:
Phone Registers with google 获取 registration_id,将 registration_id 发送到服务器,在发送推送通知时使用 registration_id。如果 registration_id 被谷歌更新,他们将发送一个新的注册广播。
但是,我遇到过手机已注册并成功接收推送通知的情况,但有一天服务器将推送通知发送到手机,我收到错误“NotRegistered”,这表明 registration_id 已刷新但没有通过系统正确传播,无论是在电话端还是服务器端。
我的问题是还有其他人遇到过这样的问题吗?确保这种情况不会发生的最佳方法是什么?
最佳答案
来自Android Cloud to Device Messaging Framework文档:
Note that Google may periodically refresh the registration ID, so you should design your application with the understanding that the
REGISTRATION
Intent may be called multiple times. Your application needs to be able to respond accordingly.
关于Android:C2DM 在没有通知的情况下更改 registration_id?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8600369/