What are GCM and FCM?

fcm-vs-gcm

fcm-vs-gcm

What is FCM and why should we use it?

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.

 

How does it work?

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.

 

 

FCM

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).

Google says:

We will continue to support the current version of GCM Android and iOS SDKs because we know a lot of developers are using GCM SDKs today to handle notifications, and client app upgrade takes time.

But all new client-side features will be added to FCM SDKs only moving forward. You are strongly encouraged to upgrade to FCM SDKs.

 

How to update old Android applications from GCM to FCM?

From //developers.google.com/cloud-messaging/android/android-migrate-fcm:

Import your GCM project as a Firebase project:

In the Firebase console, select Import Google Project.

Select your GCM project from the list of existing projects and select Add Firebase.

In the Firebase welcome screen, select Add Firebase to your Android App.

Provide your package name and SHA-1, and select Add App. A new google-services.json file for your Firebase app is downloaded.

Select Continue and follow the detailed instructions for adding the Google Services plugin in Android Studio.

 

More Info:

When referring to the Firebase Official Pricings Page, the features that are included for free are:

Analytics, App Indexing, Authentication, Dynamic Links, FCM, Invites, Notifications, Crash Reporting, & Remote Config

As per the recent highlights:

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.

 

Important links:

//stackoverflow.com/questions/37311188/migration-from-gcm-to-fcm-needed

//firebase.google.com/pricing/

//developers.google.com/cloud-messaging/faq

//firebase.google.com/docs/cloud-messaging/http-server-ref (Firebase Cloud Messaging HTTP Protocol)

//developers.google.com/cloud-messaging/http-server-ref (HTTP Connection Server Reference)

//firebase.google.com/docs/cloud-messaging/

//www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/

//stackoverflow.com/questions/19560448/how-to-avoid-delay-in-android-gcm-messages-change-heartbeat (How to avoid delay in Android GCM messages/change heartbeat)

 

 

 

Please follow and like us:
569

No Responses

  1. RyldevY says:
    Your comment is awaiting moderation.

    mail order isotretinoin Aurora Amoxicillin And Abnormal Menstual Cycles cialis price Viagra Pour Canard

Leave a Reply

Your email address will not be published. Required fields are marked *

www.000webhost.com