Android C2DM getting NotRegistered response

為{幸葍}努か 提交于 2019-12-24 11:55:18

问题


Thank you for reading my post:

I had C2DM working perfectly in my application. To test a different scenario I unregistered my phone so that it would not receive pushes anymore, and then I re-registered my phone. Since I have re-registered push does not work.

Here are the steps I'm experiencing:

  1. My phone receives a registration_id with no erros
  2. I do a post to Google with my registration_id within a few minutes of receiving the id
  3. I get a response of Error=NotRegistered

I don't see anything strange in LogCat during this process. I'm at a loss and any help is much appreciated.

Thank you, Matt


回答1:


When you're using the C2DMMessaging class provided by Google to do push and you're calling the static method C2DMMessaging.register(Context context,String senderId), you must pass in the senderId that you registered for C2DM with.

It will still give you a registration id back from the C2DM servers if you use an account on the phone, but it will not work for your purposes.

Thanks, Matt



来源:https://stackoverflow.com/questions/3778960/android-c2dm-getting-notregistered-response

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!