Patrick Sturm Patrick Sturm - 7 months ago 135
Android Question

Is a GCM Registration Token equal to the GCM Registration ID ?

i got confused by gcm today. I dont know if my registrationid is correct. I got characters and a colon in front of a registrationid starting with APA. The Pattern is xXXXxxX:APA... . I implemented google cloud messaging for a android client using the example from here: . If i use a older implementation (for example with GCMRegistrar) i only get a registration id starting with APA. Till now i though a registration id has to start with APA.

Is the stuff before the colon some tokenspecific stuff? Do i have to pass the full token to the webservice or is it okay if i cut the chars before the colon and send the registration starting with APA?


GCM Registration Token is equal to registration_id, so is Instance ID. As I mentioned in my answer here:

An FCM Token, or much commonly known as a registrationToken like in . As described in the GCM docs:

An ID issued by the GCM connection servers to the client app that allows it to receive messages. Note that registration tokens must be kept secret.

Different terms point to the same thing. The format for the registration token may also vary as seen this answer:

The GCM registration token is usually around 140 chars in length, and can contain colons, underscores and hyphens. Maximum size is supposed to be 4k.

Though I'm not entirely sure with regards to the character length, I think I've read on a post here somewhere that it may exceed that number. Do search around.