Send Firebase push notification from one android device to many devices.

Arpan Mandal
Animixer Studios
Published in
1 min readMar 24, 2021

Notifications are a very effective way of keeping your users engaged in your app. There are many services that you can opt for to send notifications to your android apps. Today I’m going to show you how you can send push notifications from your one android app to many android apps using Firebase Cloud Messaging.

For sending notifications to your devices first you need to integrate the Firebase cloud notification into your app. You can find the main documentation here https://firebase.google.com/docs/cloud-messaging.Then you have to hit https://fcm.googleapis.com/fcm/send URL with a JSON file containing the notification name and body with the header of your FCM key. To get the FCM key you need to visit the Firebase project, then project settings, and the Cloud Messaging. There you will find the required unique key. Then follow the below method to send the notifications to your devices.

Replace the strings with your custom string. To receive the notification for a particular topic, you have to subscribe that device to this topic programmatically. Just create an instance of FirebaseCloudMessaging and use the method SubscribeToTopic(“Topic_name”). Then use the above method to send the notification.

--

--

Arpan Mandal
Animixer Studios
0 Followers
Editor for

Android and Web Developer | UI & Graphics Designer | Animixer Studios.