What are GCM and FCM?

FCM (Firebase Cloud Messaging) is a new, improved version of the Google Cloud Messaging API under the Firebase brand. It has all the features of GCM as well as some additional features. Per the Firebase FAQ, it “inherits GCM’s core infrastructure, with new SDKs to make Cloud Messaging development easier”. Google explained their decision to release FCM in their Cloud Messaging FAQ, where they wrote:

Firebase is known for being cross platform, so FCM now makes a natural fit in the Firebase suite of features designed for Android, iOS, and mobile web

Google recommends upgrading from GCM to FCM in their APIs for Android Release Notes. Reasons for doing so are given in the Firebase FAQ:

Benefits of upgrading to FCM SDK include:

Simpler client development. You no longer have to write your own registration or subscription retry logic.

An out-of-the-box notification solution. You can use Firebase Notifications, a serverless notifications solution with a web console that lets anyone send notifications to target specific audiences based on Firebase Analytics insights.

An FCM implementation includes an app server that interacts with FCM via HTTP or XMPP protocol and a client app. You can compose and send messages using the app server or the Notifications console.

Firebase Notifications is built on Firebase Cloud Messaging and shares the same FCM SDK for client development. For testing or for sending marketing or engagement messages with powerful built-in targeting and analytics, you can use Notifications. For deployments with more complex messaging requirements, FCM is the right choice.

Is GCM deprecated?

FCM seems like a better version of GCM, being available on multiple platforms (even web!) and simpler to setup (compare to GCM).

Firebase Cloud Messaging builds on and improves the Google Cloud Messaging API. You can keep using Google Cloud Messaging with com.google.android.gms.gcm, but we recommend upgrading to com.google.firebase:firebase-messaging.