3

Anyone have experience with it? I'm investigating migrating, but as we already have the app released with GCM, with thousands of users and thousands of notifications daily, I'm reluctant for fear of disrupting existing service. Did anyone manage a smooth transition?

Specifically, in the tutorial (https://developers.google.com/cloud-messaging/android/android-migrate-fcm) step one is 'Import Google Project'. Is this a one-way operation? Will existing GCM server solution and deployed GCM apps continue to work?

Or is the best bet to create a new project, and maintain two server solutions until the GCM deployed apps are phased out?

jpop
  • 1,094
  • 1
  • 7
  • 19

2 Answers2

6

Importing your Google project into Firebase is a one way operation, however this is not a destructive operation, your current project will have required APIs turned on and necessary API keys will be generated for use with Firebase, but you can still manage that project from the Google Developer console if you decide not to continue using Firebase.

Your present server solutions will continue to work as before. I would go with importing your project to Firebase. It will be much easier than having to migrate your backend to a new project.

note:

  • If you were using pre InstanceID tokens for device IDs then they will not work in the Firebase console or with topics. So you would have to maintain a mapping of which users you can send to using the Firebase console and/or topics. If your were using GCM with InstanceID then there is nothing to do since FCM also uses InstanceID. You can use the FCM REST API to send to ALL tokens, InstanceID or pre InstanceID.
  • Be sure not to use GCM and FCM libs in the same client app. You can find issues when generating tokens and handling received messages.
Arthur Thompson
  • 9,087
  • 4
  • 29
  • 33
  • So pre-InstanceID tokens can be used with new FCM api (https://fcm.googleapis.com/fcm/send) to send simple push messages (for individual token) ? I'm sorry, just can't find such info in official google documentation - maybe you can provide a link ? I'm just working on a steps to migrate pre-InstanceID GCM implementation to FCM – Oleksandr Aug 02 '16 at 14:13
  • 1
    There are no docs explicitly calling out this fact, however if you have a look at the endpoint that was defined when GCM was introduced (https://developers.google.com/cloud-messaging/c2dm#server) it is the same endpoint that is used by GCM with InstanceID today. The FCM endpoint for now passes the request to the same enfrastructure as the GCM endpoint. Note however that there are limitations to what can be done with pre IID tokens so I'd advise eventually updating all clients to IID. – Arthur Thompson Aug 02 '16 at 15:42
  • @ArthurThompson could you please refer to somewhere explaining the issues you mentioned when using GCM and FCM libs together in the same app? – Zohar Levin Jan 03 '17 at 07:24
  • At this point there should be no issue using them together, there were some possible race conditions that have been recently resolved however that scenario is not officially supported and there may be issues that are not known. It is still recommended to use either fcm or gcm. – Arthur Thompson Jan 10 '17 at 21:41
1

First test out, There are many things to take care in FCM.

Major issues :

  1. White Notification Icon while app is in background or killed.
  2. App hangs after opening closing multiple times.

Read these issues to decide:

Community
  • 1
  • 1
Hisham Muneer
  • 8,558
  • 10
  • 54
  • 79