<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rohan Patange  on Medium]]></title>
        <description><![CDATA[Stories by Rohan Patange  on Medium]]></description>
        <link>https://medium.com/@rohanpatange?source=rss-1f68e7cd0102------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Rohan Patange  on Medium</title>
            <link>https://medium.com/@rohanpatange?source=rss-1f68e7cd0102------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 04:13:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rohanpatange/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Notifications & FCM: Push Notifications with Firebase in Android]]></title>
            <link>https://medium.com/@rohanpatange/notifications-fcm-push-notifications-with-firebase-in-android-62b55f71d579?source=rss-1f68e7cd0102------2</link>
            <guid isPermaLink="false">https://medium.com/p/62b55f71d579</guid>
            <category><![CDATA[push-notification]]></category>
            <category><![CDATA[notifications-and-fcm]]></category>
            <category><![CDATA[firebase-in-android]]></category>
            <dc:creator><![CDATA[Rohan Patange ]]></dc:creator>
            <pubDate>Mon, 16 Mar 2026 16:46:46 GMT</pubDate>
            <atom:updated>2026-03-16T16:46:46.950Z</atom:updated>
            <content:encoded><![CDATA[<p>Push notifications are an essential feature in modern mobile applications. They allow apps to communicate with users even when the application is not actively being used. In Android development, one of the most popular services for implementing push notifications is <strong>Firebase Cloud Messaging (FCM)</strong>.</p><p>This blog explains what push notifications are, how Firebase Cloud Messaging works, and how developers can implement it in Android applications.</p><h3>What Are Push Notifications?</h3><p>Push notifications are messages sent from a server to a user’s device. These notifications appear on the device’s notification panel even when the application is closed.</p><p>Common examples include:</p><ul><li>Message alerts from chat applications</li><li>Updates from social media apps</li><li>Promotional notifications from shopping apps</li><li>Reminder notifications from productivity apps</li></ul><p>Push notifications help increase user engagement by delivering real-time updates directly to the user.</p><h3>What is Firebase Cloud Messaging (FCM)?</h3><p>Firebase Cloud Messaging (FCM) is a free messaging service provided by <strong>Google Firebase</strong> that allows developers to send notifications and data messages to Android, iOS, and web applications.</p><p>With FCM, developers can:</p><ul><li>Send notifications to a single device</li><li>Send messages to multiple devices</li><li>Broadcast messages to subscribed topics</li><li>Deliver notifications instantly through the cloud</li></ul><p>FCM replaces the older Google Cloud Messaging (GCM) service and provides a more reliable and scalable messaging system.</p><h3>How Firebase Cloud Messaging Works</h3><p>The communication process in FCM involves three main components:</p><ol><li><strong>Client App</strong><br> The Android application that receives the notification.</li><li><strong>Firebase Cloud Messaging Server</strong><br> Firebase servers that manage and deliver the messages.</li><li><strong>Application Server (Optional)</strong><br> A backend server that sends messages to Firebase.</li></ol><p>The typical workflow is:</p><ol><li>The Android app registers with Firebase.</li><li>Firebase generates a unique <strong>registration token</strong> for the device.</li><li>The app sends this token to the application server.</li><li>The server sends a notification request to Firebase.</li><li>Firebase delivers the notification to the user’s device.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OXIDsDeIad24f6AiYhdMzQ.png" /></figure><h3>Steps to Implement Push Notifications Using FCM in Android</h3><h3>1. Create a Firebase Project</h3><ol><li>Go to the Firebase Console.</li><li>Click <strong>Create Project</strong>.</li><li>Add your Android application to the project.</li></ol><h3>2. Add Firebase to the Android App</h3><p>Download the <strong>google-services.json</strong> file from Firebase and place it in the <strong>app folder</strong> of your Android project.</p><p>Then add dependencies in your Gradle files.</p><h3>3. Create a Firebase Messaging Service</h3><p>Create a class that extends FirebaseMessagingService to receive messages.</p><pre>public class MyFirebaseMessagingService extends FirebaseMessagingService {<br><br>    @Override<br>    public void onMessageReceived(RemoteMessage remoteMessage) {<br>        super.onMessageReceived(remoteMessage);<br><br>        if (remoteMessage.getNotification() != null) {<br>            String title = remoteMessage.getNotification().getTitle();<br>            String message = remoteMessage.getNotification().getBody();<br>        }<br>    }<br>}</pre><p>This method is triggered whenever a notification is received.</p><h3>4. Register the Service in AndroidManifest</h3><p>Add the service inside the <strong>AndroidManifest.xml</strong> file.</p><pre>&lt;service<br>    android:name=&quot;.MyFirebaseMessagingService&quot;<br>    android:exported=&quot;false&quot;&gt;<br>    &lt;intent-filter&gt;<br>        &lt;action android:name=&quot;com.google.firebase.MESSAGING_EVENT&quot;/&gt;<br>    &lt;/intent-filter&gt;<br>&lt;/service&gt;</pre><h3>5. Send a Test Notification</h3><ol><li>Open the Firebase Console.</li><li>Go to <strong>Cloud Messaging</strong>.</li><li>Click <strong>Send your first message.</strong></li><li>Enter a notification title and message.</li><li>Select your app and send the message.</li></ol><p>The notification should now appear on the device.</p><h3>Advantages of Using Firebase Cloud Messaging</h3><p>Using FCM offers several benefits:</p><ul><li><strong>Free to use</strong></li><li><strong>Reliable message delivery</strong></li><li><strong>Supports Android, iOS, and Web</strong></li><li><strong>Easy integration with Firebase services</strong></li><li><strong>Scalable for large applications</strong></li></ul><p>Because of these advantages, many popular apps rely on FCM for their notification systems.</p><h3>Conclusion</h3><p>Push notifications are a powerful tool for keeping users informed and engaged with mobile applications. Firebase Cloud Messaging simplifies the process of sending and receiving notifications in Android apps by providing a reliable cloud-based infrastructure.</p><p>By integrating FCM, developers can easily implement real-time messaging features and enhance the overall functionality of their applications.</p><p>As mobile applications continue to evolve, push notifications will remain a key component in improving communication between apps and users.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62b55f71d579" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>