Android C2DM 服务器端问题
我正在开发一个服务器端应用程序来与已准备好 C2DM 的 Android 应用程序进行通信。作者或设备端应用程序给了我一个 Google 身份验证令牌,我用它来发送消息,效果很好。我正在尝试使用与他提供的电子邮件帐户不同的电子邮件帐户发送消息,因此我执行了以下操作:
- 注册了一个帐户
- 收到了一封电子邮件,说我已被列入白名单
- 电子邮件地址和密码生成身份验证令牌的代码
- 找到了根据所使用的 用于发送消息的新身份验证令牌
- 当我使用此其他身份验证令牌发送消息时,我收到无效注册
我的问题是,问题是我的电子邮件帐户不是开发该应用程序的帐户吗?如果我想将示例代码发送给其他人,我是否需要隐藏身份验证令牌?
我试图让我交给服务器应用程序的人输入他们自己的白名单帐户,生成身份验证令牌并向设备发送消息。我想我错过了一些东西。
最后,我看到该设备有一个注册 ID。我将其与一些文本一起发送到消息中。正如我所说,我在设备上看到带有原始身份验证令牌的文本。
I am developing a server side app to communicate with an android app that is ready for C2DM. The author or the device side app gave me a Google auth token that I use to send messages and that works fine. I am trying to send messages with a different email account than the one he provided so I did the following:
- signed up for an account
- recevied an email saying I have been whitelisted
- found code to generate an auth token based on a email address and password
- used that new auth token to send messages
- I get Invalid Registration when I send messages with this other auth token
My question is, is the problem that my email account isn't the account that developed the app? If I wanted to send the example code to other folks would I need to hide the auth token?
I was trying to have the people I hand the server app to enter thier own white listed account, generate an auth token and send messages to the device. I guess I am missing something.
Lastly, I see the device has a registrationID. I am sending that in the message along with some text. Like I said, I see the text on the device with the original Auth Token.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的电子邮件地址有两个用途:
这两个电子邮件地址必须相同!否则您会收到无效注册响应。
您的客户可以向您提供此邮件地址,因为它仅用作角色帐户,因此其中不应有任何邮件。
通常,当您将代码传递给其他开发人员/论坛等时,您只需写下身份验证令牌的一部分(例如 AuthToken=fejwio23j23i...hweiofWE3)。
Your email address is used in two places:
These two email addresses have to be the same! Otherwise you get a Invalid Registration response.
Your client can give you this mail address, since it is only meant as a role account, so there shouldn't be any mail in it.
Normally when you pass your code to another developer / on a forum etc, you just write down a part of the auth token (e.g. AuthToken=fejwio23j23i...hweiofWE3).