4

I have a working Android app with 100K+ users which are using an old GCM API key to receive notifications. I would like to upgrade our server to use FCM, but I am not sure if I can produce a new Firebase API key while keeping old clients with GCM. As it seems, I have to create a new project with my app and use the API key generated there, but will it disable my old GCM API key?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
roybensh
  • 41
  • 1
  • keys still work but you need to be able to differentiate between FCM key and GCM key as you need to call different endpoints for each – tyczj Jan 10 '18 at 19:25

2 Answers2

2

We migrated our app from GCM to FCM a few months ago. And we had over 1M active monthly users back then and it was a very nervous migration for us.

Following the migration guide, you'll need to import your GCM project as a Firebase project and did a bunch of changes in the app.

We did git-diff/compare the generated google-services.json vs what we have in the previous version and confirmed that the API key was not changed.

It was a 100% backward compatible, seamless migration for us.

And as of Mar 2019, you will also have to migrate the backend service.


Jan 2018:

Updating these endpoints is not strictly required, as Google will continue to support the existing GCM endpoints.


Nov 2018 (credits to @JonEgerton, looks like they are leaning toward dropping support for it eventually):

The FCM equivalent of the GCM HTTP protocol is labeled "legacy" only to distinguish it clearly from the HTTP v1 API. The API is fully supported and Google has no near-term plan to deprecate it.

Mar 2019:

We will turn off most GCM services in April 2019, so you should plan to have most of your services migrated by then.

Note that client SDKs and GCM tokens will continue to work indefinitely. However, you won't be able to target the latest version of Google Play Services in your Android app unless you migrate to FCM. ref: https://developers.google.com/cloud-messaging/faq

Yuchen
  • 30,852
  • 26
  • 164
  • 234
  • Did you have to change the API Key though? Because I've tried implementing my FirebaseMessagingService and it did not receive push notifications when sent to the GCM end point. – roybensh Jan 15 '18 at 09:52
  • @roybensh No, in our case, the API Key wasn't changed. – Yuchen Jan 15 '18 at 13:30
  • So, after importing your GCM project as a Firebase project, everything was working fine as usual ? I mean your existing apps with FCM migration. – Min Soe Jul 24 '18 at 08:05
  • Really weird. We are migrating now and I had to change the server key, but changing it stopped notifications for apps still on gcm. @roybensh what did you end up doing? – riadrifai Aug 07 '18 at 12:40
  • 1
    Googling the above comment about continued support leads to a few leads, saying they came from the following page: https://developers.google.com/cloud-messaging/android/android-migrate-fcm. However this page now (6th Nov 2018) does not contain this text. They now say: Note: "The FCM equivalent of the GCM HTTP protocol is labeled "legacy" only to distinguish it clearly from the HTTP v1 API. The API is fully supported and Google has no near-term plan to deprecate it." Whether you want to trust this, or to migrate properly to the new endpoints is therefore something to consider. – Jon Egerton Nov 06 '18 at 11:35
  • 1
    @JonEgerton that's interesting to see. Thanks! I will add this piece of info above too. – Yuchen Nov 06 '18 at 14:28
  • 1
    @YuchenZhong: Thanks. It was the use of the phrase "no near-term plan" rather than something more committed (like "no plan") that made it worth calling it out. – Jon Egerton Nov 07 '18 at 14:57
0

In the documentation i never read the migration will be disabled the old GCM API Key. MIGRATION

josedlujan
  • 5,357
  • 2
  • 27
  • 49