Android C2DM getting (401) Unauthorized

六眼飞鱼酱① 提交于 2019-11-29 04:55:24

Advice corner: Have some confidence in your code every once and a while! And, even Google messes up sometimes.

After spending about nine hours reading every blog post and article about Google OAuth and C2DM and trying different things in my code, I emailed Google. I'm excited to say that not only did I receive a response very quickly, but also that my account was messed up. Something went wrong while I was registering on their site and although it appeared that everything was working from the registration success email I received, it wasn't. I re-registered and everything works!

I have encountered a similar problem: error 401 "Unauthorized" while trying a google c2dm (cloud to device messaging) code sample. It looks like the example used to work as is, but now Google has changed its conditions. Before running code examples, you have to sign-up:

http://code.google.com/android/c2dm/signup.html

I signed up, and the stuff began to work in minutes.

I've got the same problem, i.e. suddenly my C2DM_ACCOUNT_EMAIL stopped working.

To solve the problem, just fill the registration again with same info and the same C2DM_ACCOUNT_EMAIL.

HTH

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