获取INVALID_SENDER一台​​设备上,而它的另一个GCM机器人工作 [英] Getting INVALID_SENDER on one device while its working with another GCM android

查看:193
本文介绍了获取INVALID_SENDER一台​​设备上,而它的另一个GCM机器人工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下面<一href="http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/">Android使用谷歌云消息(GCM)实施GCM与我的应用程序,它正在罚款单台设备推送通知(银河S)当我试图与测试其他设备(Galaxy Tab的7')其发生错误。

I am following Android Push Notifications using Google Cloud Messaging (GCM) to implement GCM with my application it was working fine on single device (Galaxy S) when i tried to test it with another device( Galaxy Tab 7') its generating error.

handleRegistration:registrationId = NULL,错误= INVALID_SENDER,未注册= NULL

handleRegistration: registrationId = null, error = INVALID_SENDER, unregistered = null

这里是日志这我收到

V/GCMRegistrar(5649): Registering app  my_maypackage of senders APA91bHvzZbO_nyYvaA_QRGDaV-wRAYKjt0qJSQmzPUi2unqG7j0OGuyhVY1A3zh-ZfnA0XT0ffgyKypVJ_5owLZvZBNGARpTBkBg9ED8gVVCDejaIpShghq_tXGhMnFQEufwdCL1ibm
V/GCMRegistrar(5649): Setting registeredOnServer status as true until 2013-04-02 11:02:07.847

V/GCMBroadcastReceiver(5649): onReceive: com.google.android.c2dm.intent.REGISTRATION
V/GCMBroadcastReceiver(5649): GCM IntentService class: my_maypackage.GCMIntentService
V/GCMBaseIntentService(5649): Acquiring wakelock
V/GCMBaseIntentService(5649): Intent service name: GCMIntentService-980172650021-7

D/GCMBaseIntentService(5649): handleRegistration: registrationId = null, error = INVALID_SENDER, unregistered = null
D/GCMBaseIntentService(5649): Registration error: INVALID_SENDER
I/GCMIntentService(5649): Received error: INVALID_SENDER
V/GCMBaseIntentService(5649): Releasing wakelock

请注意:这两个设备都配置了相同的Gmail帐户

Note: both devices are configured with same gmail account.

推荐答案

日志中显示不正确的发件人ID。它应该从谷歌API项目的URL。例如

Log is showing incorrect sender ID. it should be taken from Google api project url. e.g

<一个href="https://$c$c.google.com/apis/console/b/0/#project:65464654646546">https://$c$c.google.com/apis/console/b/0/#project:65464654646546

然后65464654646546是发件人ID。

then 65464654646546 is sender ID.

这篇关于获取INVALID_SENDER一台​​设备上,而它的另一个GCM机器人工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆