7

I'm considering migration to FCM. The client side of things is rather simple, you move some code around and get it done. However, on the app server, I'd need to support older clients as well, for obvious reasons. I need to know what happens when I migrate a GCM project to FCM. Does FCM automatically forward messages to older GCM-based clients as well? Or would I need to send each message twice, once to FCM and once to GCM? How will this impact implementation-specific stuff such as messages sent from Firebase's web console? Are there any details I should be aware of?

Arshia001
  • 1,612
  • 11
  • 18

3 Answers3

7

Using FCM (an imported project or using it's endpoint, whichever you mean) is still compatible with GCM clients (specifically tokens). They'd still be able to receive messages like usual.

See these similar posts:

Community
  • 1
  • 1
AL.
  • 33,241
  • 9
  • 119
  • 257
  • 2
    So, basically, I just send a topic message to the FCM endpoint, it'll automatically push it to older GCM clients as well, right? Sorry to ask again and again, it's really critical that the transition go smoothly. – Arshia001 Mar 26 '17 at 17:18
1

FCM act as platform for triggering notification and internally GCM control notification whether you use FCM,Localytics ,mixpanel etc as you platform. As long as Api key is same for any paltform.You don't have to worry about FCM or GCM.

Just make sure you are using same server key (Api Key) for FCM which was for GCM.

Alternatively Check below link for details for FCM solution to handle such case .

https://support.pushcrew.com/support/solutions/articles/9000064351-setting-up-your-fcm-keys-previously-called-gcm-

Justcurious
  • 1,951
  • 1
  • 18
  • 34
  • Using the same Server Key doesn't really make the compatibility to work (hence it's possible to re-generate the keys). Also do note that there may be instances where [importing a project to FCM, will generate a new Server Key](https://developers.google.com/cloud-messaging/android/android-migrate-fcm#import_your_gcm_project_as_a_firebase_project): "*Note: If Google creates an additional server key for your project labeled, "(auto created by Google Service)," use this new key instead of your existing key.*" -- it would be advisable to refer to the official documentation instead. – AL. Mar 25 '17 at 15:31
-5

Either you might need to send notification manually to both versions of client as GCM and FCM are not exactly same.

Better way is to enable force upgrade (If implemented in app) so that all user base can move to new version of app.

  • Yeah, but GCM users might get duplicate messages. And I'm not going to force an update because of a change that should be completely transparent to users. – Arshia001 Mar 25 '17 at 13:33
  • "*Sending to both versions manually*" -- this gives the idea that you need to send two separate messages, which is *not* necessary. – AL. Mar 25 '17 at 14:40
  • @Arshia001, Yes. Please keep it transparent. You could display message of why are you asking users to upgrade. – Sanjeev kumar Sharma Mar 29 '17 at 14:23
  • @AL., If GCM keys are same then no issues but if its not then you need to. – Sanjeev kumar Sharma Mar 29 '17 at 14:25
  • 1
    "We updated some stuff you'll probably never even know existed, so here's a forced update!" changelog of the year. – Arshia001 Mar 29 '17 at 14:46
  • Like I mentuoned in my comment in @Justcurious' answer, there is a possibility of the intended Server key to change, but this still doesn't mean you have to send separate messages for GCM and FCM clients. – AL. Mar 29 '17 at 16:48