什么Causses酒店GCM服务器返回NotRegistered? [英] What causses GCM Server to return NotRegistered?
问题描述
我实施 GCM服务器
喜欢它的指南中说,它运作良好。我做了所有的步骤,当我发了 http请求
到 GCM服务器
它返回一个成功
响应。结果
然而,在每一次,而它给了我一个 NotRegistered
响应这使我得到一个新的 registeration ID
。
我应该说,应用程序仍处于开发阶段,但我不明白为什么在code小的变化应该影响登记和我正在一个 GenyMotion
模拟器如果它很重要。结果
在引导它说:
I implemented GCM server
like it said in the guide and it worked well. I did all the steps and when I sent an http request
to the GCM server
it returned a success
response.
However, every once in a while it gives me a NotRegistered
response which makes me get a new registeration ID
.
I should say that the the app is still under development but I don't see why small changes in the code should effect the registration and I'm working on a GenyMotion
emulator if it matters.
In the guide it Says:
如果它是NotRegistered,你应该从你的服务器数据库,因为该应用程序从设备卸载或它不具有广播接收器配置为接收com.google.android.c2dm.intent.RECEIVE意图删除注册ID。
If it is NotRegistered, you should remove the registration ID from your server database because the application was uninstalled from the device or it does not have a broadcast receiver configured to receive com.google.android.c2dm.intent.RECEIVE intents.
但我不知道该怎么从该得到的。被关闭模拟器或改变code算作卸载应用程序?
But I'm not sure what to get from that. Is turning off the emulator or changing the code counts as uninstalling the application?
编辑:结果
这不是改变code或CH375复位的仿真器
。我查了一定注册ID
和它去罚款。几分钟后,我再次检查,并得到NotRegistered。有人吗?..
It's not about changing the code or reseting the emulator
. I checked a certain registration id
and it went fine. After a few minutes I checked it again and got "NotRegistered". Anyone?..
推荐答案
@ GM6你应该确保你的推送服务器删除存储的注册ID,如果GCM响应包括未注册错误。 Othrewise您的服务器继续得到这个错误,同时尝试与存储REGID发送消息。我已经回答了这个问题<一href=\"http://stackoverflow.com/questions/26718115/gcm-error-not-registered/26723870#26723870\">here
@GM6 you should be sure that your push server remove stored registration id if GCM response include Not Registered error. Othrewise your server continue get this error while try to send message with stored regId. I've already answer on this question here
这篇关于什么Causses酒店GCM服务器返回NotRegistered?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!