Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are FCM and GCM backward and forward compatible?

Google is deprecating Google Cloud messaging in favor of Firebase Cloud Messaging:

Firebase Cloud Messaging (FCM) is the new version of GCM. It inherits the reliable and scalable GCM infrastructure, plus new features! See the FAQ to learn more. If you are integrating messaging in a new app, start with FCM. GCM users are strongly recommended to upgrade to FCM, in order to benefit from new FCM features today and in the future.

From some tests I made on my servers, the FCM URL (https://fcm.googleapis.com/fcm/send) works with GCM projects, and vice-versa - the GCM URL (https://android.googleapis.com/gcm/send) works with FCM projects.

Migrating all existing GCM push sending code to FCM would save a lot of trouble and refactoring (I will not have to check, for each push, whether the app version is FCM or GCM).

Is this backward and forward compatibility officially supported or documented?

like image 696
Adam Matan Avatar asked Sep 18 '16 09:09

Adam Matan


People also ask

Is GCM and FCM same?

Firebase Cloud Messaging(FCM), was formerly known as Google Cloud Messaging(GCM). FCM is a cloud platform that provides messages and push notifications for operating systems- ios and Android, and websites as well.

What is FCM and GCM?

Firebase Cloud Messaging (FCM), formerly known as Google Cloud Messaging (GCM), is a cross-platform cloud solution for messages and notifications for Android, iOS, and web applications, which as of June 2022 can be used at no cost.

Can FCM notification on Android overwrite previous one?

It's possible. Two approaches. First is you make use of the collapse_key parameter to set the message as a collapsible message.

Is FCM deprecated?

Starting March 22, 2020, the versions 81 and 82 of chrome disallow the creation of any new subscriptions using FCM sender IDs. However, the versions 78,79 and 80 of chrome will still allow the FCM Sender IDs that were used before September 2019. All the other FCM Sender IDs will be rejected.


1 Answers

If you refer to @IanBarber's answer here:

The tokens are different. Firebase Cloud Messaging (GCM) use gets registration tokens from the Instance ID API which means you'll get different tokens between that and GCM2.

You'll need to send that new token back to your server to send messages. On the server side the APIs should be fully compatible (just new endpoints for FCM).

However, if you're looking for any official documentation, I don't think there is one that explicitly states it. Since as much as possible, Google encourages the use of the corresponding APIs, endpoints, etc. depending on what you really intend to use.

like image 191
AL. Avatar answered Oct 13 '22 15:10

AL.