没有从服务器获取Android设备的推送通知

时间:2013-11-29 09:29:06

标签: android google-cloud-messaging

我正在使用来自Android Hive GCM example的GCM示例,我有共享服务器所以我已将我的服务器代码放在那个

我的设备已成功注册

enter image description here

也在服务器和数据库中我正在进入

在mysql中,条目是

enter image description here

在服务器

enter image description here

我获得成功logcat也是

     11-29 17:55:17.796: V/GCMBaseIntentService(29081): Intent service name: GCMIntentService-572954477211-1
     11-29 17:55:17.796: E/GCMRegistrar(29081): internal error: retry receiver class not set yet
     11-29 17:55:17.796: V/GCMRegistrar(29081): Registering receiver
     11-29 17:55:17.796: D/GCMBaseIntentService(29081): handleRegistration: registrationId = APA91bG5js7Op0v4VQe9Rj_MlXVggCwGZI0KQutCjbBLtu5t07BHguKvWhQiU6JauTOvF9Ilzn9-_cbXuTg0HxUg9dL7FNIZvlt1zB6LIFHlBZ8mi-ebRyo9KZTO1XpcLzLBKQLSHyCTsBUSeuO2tlJY9Tm3o9zphA, error = null, unregistered = null
     11-29 17:55:17.796: D/GCMRegistrar(29081): resetting backoff for com.igeniusdev.gcmexample
     11-29 17:55:17.846: V/GCMRegistrar(29081): Saving regId on app version 1
     11-29 17:55:17.886: I/GCMIntentService(29081): Device registered: regId = APA91bG5js7Op0v4VQe9Rj_MlXVggCwGZI0KQutCjbBLtu5t07BHguKvWhQiU6JauTOvF9Ilzn9-_cbXuTg0HxUg9dL7FNIZvlt1zB6LIFHlBZ8mi-ebRyo9KZTO1XpcLzLBKQLSHyCTsBUSeuO2tlJY9Tm3o9zphA
     11-29 17:55:17.916: D/NAME(29081): amit
     11-29 17:55:17.916: I/AndroidHive GCM(29081): registering device (regId = APA91bG5js7Op0v4VQe9Rj_MlXVggCwGZI0KQutCjbBLtu5t07BHguKvWhQiU6JauTOvF9Ilzn9-_cbXuTg0HxUg9dL7FNIZvlt1zB6LIFHlBZ8mi-ebRyo9KZTO1XpcLzLBKQLSHyCTsBUSeuO2tlJY9Tm3o9zphA)
     11-29 17:55:17.916: D/AndroidHive GCM(29081): Attempt #1 to register
     11-29 17:55:17.956: V/AndroidHive GCM(29081): Posting 'email=kinjal.amr@gmail.com&regId=APA91bG5js7Op0v4VQe9Rj_MlXVggCwGZI0KQutCjbBLtu5t07BHguKvWhQiU6JauTOvF9Ilzn9-_cbXuTg0HxUg9dL7FNIZvlt1zB6LIFHlBZ8mi-ebRyo9KZTO1XpcLzLBKQLSHyCTsBUSeuO2tlJY9Tm3o9zphA&name=amit' to http://ithinkapp.com/gcmTest/register.php
    11-29 17:55:17.956: E/URL(29081): > http://ithinkapp.com/gcmTest/register.php
    11-29 17:55:19.696: V/GCMRegistrar(29081): Setting registeredOnServer status as true until 2013-12-06 17:55:19.703
    11-29 17:55:19.736: V/GCMBaseIntentService(29081): Releasing wakelock

一切都很好但是当我尝试从服务器发送消息并按下发送按钮消息将被发送但没有在设备中获得推送通知

1 个答案:

答案 0 :(得分:0)

请将您的api密钥更改为服务器应用程序密钥(使用IP锁定),然后将密钥更改为config.php文件。

http://gcm-alert.appspot.com/也请检查此网站是否检查服务器端代码是否正常工作。