Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting INVALID_SENDER on one device while its working with another GCM android

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, error = INVALID_SENDER, unregistered = null

here is the Log which i am getting

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

Note: both devices are configured with same gmail account.

like image 338
amDroid Avatar asked Mar 26 '13 05:03

amDroid


People also ask

What is GCM push notification?

Google Cloud Messaging (GCM) was a mobile notification service developed by Google that enables third-party application developers to send notification data or information from developer-run servers to applications that target the Google Android Operating System, as well as applications or extensions developed for the ...

What is GCM service on Android?

Google Cloud Messaging (GCM) is a service that allows you to send push notifications from your server to your users' Android devices, and also to receive messages from devices on the same connection.

What is GCM Senderid?

Google Cloud Messaging (GCM) Sender ID: A unique numerical value which is created when you configure your Project in the Google Developers Console/ Google Cloud Console.


2 Answers

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

https://code.google.com/apis/console/b/0/#project:65464654646546

then 65464654646546 is sender ID.

like image 199
Shiv Avatar answered Oct 20 '22 16:10

Shiv


For me what did it was enabling the "Google Cloud Messaging for Android" from the Console's API section: enter image description here

like image 28
s1m3n Avatar answered Oct 20 '22 16:10

s1m3n