Why Invalid RegistraitonID with GCM - working with phonegap for android?

cordova, google-cloud-messaging

Solution

Check the registration ID that is generated on the client side. It seems that registration id in the client side and server side do not match.

Here is the explanation from the GCM page.

Check the formatting of the registration ID that you pass to the server. Make sure it matches the registration ID the phone receives in the com.google.android.c2dm.intent.REGISTRATION intent and that you're not truncating it or adding additional characters. Happens when error code is InvalidRegistration.

Problem

I have done with the server side coding with deviceId, apiKey and senderId. May I know why I still get this "Invalid Registration" ??

Original source