[英]Can't receive notification from server to android device using gcm
I have posted this question . 我已经发布了这个问题 。
I thought that downloading the newest version of gcm will work, but I was wrong. 我以为可以下载最新版本的gcm,但是我错了。 I have downloaded latest version of gcm but still I can't receive notification. 我已经下载了最新版本的gcm,但仍然无法收到通知。 I have a GOOGLE API KEY and a sender ID. 我有一个GOOGLE API KEY和一个发件人ID。
Everything is fine when I register the ID - it works fine and it shows in database, but when I try to send a message from the server to my android device, I am not getting the message from the server. 当我注册ID时一切都很好-它可以正常工作并在数据库中显示,但是当我尝试从服务器向Android设备发送消息时,我没有从服务器收到消息。
Can any one help me? 谁能帮我? I have tried some examples as well, but they aren't working. 我也尝试了一些示例,但是它们没有用。 Does anyone have working example, or is my API key is not valid? 有人有可行的示例吗,或者我的API密钥无效?
Please check your server code whether it access the registration ID of registered android device. 请检查您的服务器代码是否访问已注册的android设备的注册ID。
The following link has exact explanation of GCM with simple client side code and server side code. 以下链接通过简单的客户端代码和服务器端代码对GCM进行了详细说明。 http://avilyne.com/?p=267 http://avilyne.com/?p=267
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.