✕
Forbes India Leader Recognition
e.preventDefault(); // Prevent form submission input.blur(); // remove focus input.value = ""; // optional: clear the input

Migrate from GCM to FCM for Push Notification In React Native

Migrate from GCM to FCM for Push Notification In React Native

Featured Image

Tudip

Hello folks as you may know Google has removed GCM service support from 11th April 2019. Hence, all the projects which are using GCM service need to be migrated to FCM. FCM (Firebase Cloud Messaging) is introduced by Google to replace GCM (Google Cloud Messaging) as FCM provides more innovative tools the GCM.

GCM to FCM Migration

Migrate

As React native is used for hybrid application development, we use packages/library which are already developed for push notification. Hence, it necessary that library you are using also supports FCM migration. Considering for IOS you might be using APNS this blog will cover migration for Android part.

Following steps need to be followed in order to migrate to FCM

Step 1: In Order to migrate from GCM to FCM, it is necessary to have Firebase account which can be created on https://console.firebase.google.com. Create a project on Firebase console using your registered email id:

Step 2: Supply a project name, accept terms & conditions and then click on Create Project button.

Step 3: At Firebase console under Get started by adding Firebase to your app click on android icon to get started.

Step 4: Provide your package name and SHA-1, and select Add App. Download the google-services.json file required for the app.

Step 5: Select Project settings by clicking on gear icon:

Step 6: Click on Cloud Messaging tab under project settings. You will find your Sender Id and Server key.

Step 7: Replace FCM Server key with GCM API key at you server side in order to receive push notification from FCM.

Step 8: In Order to receive push notification at client side it is necessary to configure app with FCM. Replace your existing GCM sender ID with FCM sender ID in your code.

Step 9: At app-level build.gradle switch to FCM:

Before:

dependencies { compile “com.google.android.gms:play-services-gcm:16.0.0” }

After:

dependencies { compile “com.google.firebase:firebase-messaging:17.3.4” }

Step 10: Edit App’s manifest by removing GCM configuration code with FCM part:

GCM:

<uses-permission android:name=”android.permission.WAKE_LOCK” /> <permission android:name=”<your-package-name>.permission.C2D_MESSAGE” android:protectionLevel=”signature” /> <uses-permission android:name=”<your-package-name>.permission.C2D_MESSAGE” /> <receiver android:name=”com.google.android.gms.gcm.GcmReceiver” android:exported=”true” android:permission=”com.google.android.c2dm.permission.SEND” > <intent-filter> <action android:name=”com.google.android.c2dm.intent.RECEIVE” /> <category android:name=”com.example.gcm” /> </intent-filter> </receiver>

FCM:

<service android:name=“.java.MyFirebaseMessagingService”> <intent-filter> <action android:name=“com.google.firebase.MESSAGING_EVENT” /> </intent-filter> </service>

Conclusion

Once all the above steps are followed you are good to go for receiving push notification using FCM.

Related Posts

Latest Posts

  • All Posts
  • AI Powered Knowledge
  • ai/ml
  • CEO India Magazine
  • CMMI level 5 Certification
  • e-learning
  • Fintech
  • gaming
  • Generative AI
  • healthcare
  • manufacturing
  • News
  • OTT
  • Portfolio
  • supply chain
  • travel and hospitality
  • Tudip's AI Hackathon
  • Voxlearn Enterprises
    •   Back
    • Android
    • iOS
    • Java
    • PHP
    • MEAN
    • Ruby
    • DotNet
    • IoT
    • Cloud
    • Testing
    • Roku
    • CMS
    • Python
Artificial Intelligence in Healthcare

Artificial Intelligence in Healthcare

September 23, 2026

Explore how artificial intelligence in healthcare is transforming clinical decision-making, and patient care .

Read More
AI in Manufacturing: Machine Intelligence  Meets Industrial Innovation

AI in Manufacturing: Machine Intelligence Meets Industrial Innovation

September 23, 2026

Explore how AI is transforming manufacturing through predictive maintenance, intelligent quality control, data-driven operations.

Read More
Artificial Intelligence in Manufacturing: Enabling Intelligent, Flexible and Cost-Effective Production Through AI

Artificial Intelligence in Manufacturing: Enabling Intelligent, Flexible and Cost-Effective Production Through AI

September 23, 2026

Discover how AI is transforming manufacturing through intelligent automation.

Read More

India

Plot No. 11/2, Phase 3, Hinjewadi Rajiv Gandhi Infotech Park, Pune, India – 411057.
info@tudip.com
+91-96-8990-0537

United States

1999 S. Bascom Ave Suite 700, Campbell CA. 95008, USA.
info@tudip.com
+1-408-216-8162

Canada

64 Caracas Road North York, Toronto Ontario M2K 1B1, Canada.
info@tudip.com

Mexico

Calle Amado Nervo #785 Interior B Colonia Ladron De Guevara 44600 Guadalajara, Jalisco, Mexico.
info@tudip.com

Singapore

77 High Street, #10-12B High Street Plaza, Singapore 179433.
info@tudip.com

Colombia

Cra. 9 # 113-53 Of. 1405 Bogotá D.C., Colombia.
info@tudip.com

UAE

Tudip Information Technologies L.L.C Office No 109, ABU HAIL BUILDING 13, Abu Hail, Dubai, UAE.
info@tudip.com

Nigeria

22 Kumasi Crescent, Wuse 2, Abuja, Nigeria.
info@tudip.com