开发者

Push Notification for android PHP script not working?

I have developed the android application for Android. And also i developed a PHP script for send the notification to mobile device.

T开发者_StackOverflow中文版he script is running successfully and send message but my android device doesn't receive the notification.

Please any one help me to send the notification to my device


  1. You need to check on the server what HTTP response you are getting from the Google servers. Make sure it is a 200 OK response, so you know the message was sent. If you get another response (302, etc) then the message is not being sent successfully.

  2. You also need to check that the Registration ID you are using is correct. If you provide the wrong Registration ID (as a destination for the message - specifying the app, on a specific device) then the Google servers cannot successfully send it.

  3. You also need to check that your app is successfully registering with the Google servers, to receive push notifications. If the registration fails, you will not receive messages.

This tutorial provides a lot of clarity about C2DM, and include sample code. http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜