Do I need to migrate GCM to FCM on client side?
Asked Answered
L

2

4

I have the old android app on Play Store which I am not going to update anymore because of making a new app.

Do I need to migrate GCM to FCM in my old android app?

Many sources say:

You have to change your client side... blabla... etc...

but GCM and FCM FAQ says:

GCM tokens will continue to work on client devices.

Ligon answered 19/12, 2018 at 11:58 Comment(1)
Everything will work as is, if you've already implemented your GCM listeners, at least for nowCanard
A
7

Existing installs of client-side apps receiving notifications will continue to work for the foreseeable future. You don't need to get new tokens for all users. The existing tokens from GCM will continue to work

But from mid-April:

  1. You won't be able to compile code using the old client-side APIs on a newer SDK/Google Play Services anymore
  2. You won't be able to call the GCM REST API to send messages anymore
  3. New installations of your existing GCM-using app may not be able to get a token.

To compile against the new SDK/Google Play Services, you will need to make changes to your client app to migrate to Firebase Cloud Messaging from GCM. This involves changes to the build.gradle, to AndroidManifest.xml and to your code, as described in Migrate a GCM Client App for Android to Firebase Cloud Messaging.

Audit answered 19/12, 2018 at 14:30 Comment(4)
"need to make changes to your client app". puf, can you please explain what might go wrong if we don't do this?Endogen
If the app has already been deployed, it may continue to work, but there is no guarantee of that nor any support when it doesn't.Audit
So, after mid-april without changes in code existing GCM based apps will still receive push notifications from FCM based servers, am I understanding it right? If it matters, my app uses play-services-gcm:11.6.0 and the server is updated to use FCM endpont.Charest
Source on point #3? I the faq it clearly says client SDKs will continue to work: "Note that client SDKs and GCM tokens will continue to work indefinitely"Ventriloquize
J
0

You need to update your client code and migrate to FCM. Because it is officially announced to do migration and it is very likely that from a point, for example by one of the android updates, they stop supporting old api callbacks and if so you will lose part of your users.

So my advice is to do the migration as it has been long enough so far that they had supported GCM along with supporting FCM and they can't and won't do it forever.

Jehanna answered 8/1, 2019 at 13:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.