0

I want to send some message using Firebase Cloud Messaging service to all my users who are using the app. I can send data payload to a single or multiple devices using regisration_ids like this :

{

    "data": {
      "body":"body",
        "my_custom_key" : "215",
        "other_key" : true
     },
           "registration_ids": ["dCmhVkVMmLw:APA91bE5.."]

}

But how do I send data payload to all the users?

AL.
  • 36,815
  • 10
  • 142
  • 281
sreejith cr
  • 79
  • 1
  • 7
  • 1
    Possible duplicate of [Firebase Cloud Messaging - Send message to all users](http://stackoverflow.com/questions/39772167/firebase-cloud-messaging-send-message-to-all-users) – AL. Feb 27 '17 at 03:00

1 Answers1

0

You can use topics, you need to subscribe all users/devises to a topic and then perform send request.

You can read more about it here: https://firebase.google.com/docs/cloud-messaging/android/topic-messaging

IvRRimUm
  • 1,724
  • 3
  • 21
  • 40