GCM Registration Id with Firebase

121 views
Skip to first unread message

ポールマンさん

unread,
Aug 2, 2016, 6:27:09 PM8/2/16
to android-gcm
Hi, 

We are using the deprecated Framework (prior to google play services) registration method, where we send a ""com.google.android.c2dm.intent.REGISTER"" intent to the system and receive a registration Id back.  We have been using the registration Id as the push token on our servers.

In the past few months, we've begun seeing registration ids come back with Instance Ids prepended to the front, e.g. "|ID|1|:dvYWnQZ_S8w:APA91bG69n0mCyXM0gDNjA6TGW524KY3dL3-qEIeuu4WecnNlINljx16jmMROpMGxcctL0t".

Is this a recent change?  Is there an expected format for these pipe and colon separated ids, or should we not parse them in any way?

Thanks,
ポールマンさん

ポールマンさん

unread,
Aug 2, 2016, 6:31:41 PM8/2/16
to android-gcm
Also note that when sending to regIds with "|ID|1|"/etc. prepended, we receive an InvalidRegistration error.

Diego Giorgini

unread,
Aug 3, 2016, 11:48:04 PM8/3/16
to andro...@googlegroups.com
Hi,

is it possible that you are also using Firebase SDK (directly, or via some other library) ?
If this is not the case then please contact our support via:

Thanks
- Diego

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/964e710b-c66f-4943-aff9-ec7b6285db64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ポールマンさん

unread,
Aug 4, 2016, 5:10:21 PM8/4/16
to android-gcm
We recently added the Firebase SDK, but not the messaging component.

Would doing so cause the reg_ids returned by the deprecated registration method to change?

Diego Giorgini

unread,
Aug 4, 2016, 5:13:47 PM8/4/16
to andro...@googlegroups.com
Yes. Firebase SDK is incompatible with the any previous GCM SDK.
If you are using the Firebase SDK please switch to Firebase Messaging too.
That should solve your issue.

ポールマンさん

unread,
Aug 4, 2016, 5:38:23 PM8/4/16
to android-gcm
Thanks! One followup:

If we used a push library that used an older version of GCM (e.g. gcm.register()), would that be broken if we used Firebase anywhere in our app?

Also, for reference, I was wondering whether this incomptability was documented somewhere.

Appreciate the help!

Diego Giorgini

unread,
Aug 4, 2016, 5:52:30 PM8/4/16
to andro...@googlegroups.com
On Thu, Aug 4, 2016 at 2:38 PM ポールマンさん <ja...@appboy.com> wrote:
Thanks! One followup:

If we used a push library that used an older version of GCM (e.g. gcm.register()), would that be broken if we used Firebase anywhere in our app?

Yes.  Your application should have a single copy of the GCM or FCM library.
Otherwise the two library would conflict during the registration process.

Unfortunately a component of the FCM, called FirebaseInstanceId library, is required by all the other Firebase SDKs, such as Firebase Analytics.
So if you are using any Firebase SDK you should not use GCM and you should switch to FCM.
 
Also, for reference, I was wondering whether this incomptability was documented somewhere.

I believe we documented that you cannot have GCM and FCM in the same app, but we missed to document that GCM is incompatible with any other Firebase SDK. (explanation above)

Thank you for raising this issue.
I am now contacting the right team to update our documentation.
 

ポールマンさん

unread,
Aug 4, 2016, 6:11:44 PM8/4/16
to android-gcm
Makes sense, appreciate the help! :)

Diego Giorgini

unread,
Aug 5, 2016, 9:26:17 PM8/5/16
to android-gcm
I have to correct myself. This time with good news.
Through the Google Play services update version 9.4.x this issue is now fixed.
In other words:
- you can use Firebase SDK together with any previous GCM sdk.
- you can even generate gcm-token for both old GCM sdk and FCM sdk in the same app. but the onMessageReceived() must be a single one.

That said, we recommend to update your application to FCM.

ポールマンさん

unread,
Aug 8, 2016, 12:35:13 PM8/8/16
to android-gcm
Hey Diego,

Thanks for the update.  Is this fix in the Google Play Services APK or the Android libraries?  In our testing, it appears to be in the APK.

Diego Giorgini

unread,
Aug 8, 2016, 12:39:33 PM8/8/16
to android-gcm
Reply all
Reply to author
Forward
0 new messages