10

I have created a small App that's able to receive Push Notifications from the FCM Console.

What i want to do now is to send a Push-Notifications to all Android Phones that got the app Installed using the API. And this is where i got completely lost. Is there no way to send it to all Phones without collecting all the registration-ids? Does this only work with the Console but not with the API?

thanx in advance

Parag Kadam
  • 3,620
  • 5
  • 25
  • 51
mholzer78
  • 305
  • 2
  • 11

1 Answers1

18

Sending a message to all the phones like what you do from the Firebase Web Console is only possible from the Web Console. If you need this feature from the API you can submit a feature request: https://firebase.google.com/support/contact/bugs-features/

Another possibility is to have all the client registering to a specific topic via FirebaseMessaging.getInstance().subscribeToTopic(topicName)

In this way you can send a message to the whole topic without collecting the registration-ids manually.

Diego Giorgini
  • 12,489
  • 1
  • 47
  • 50
  • But i see in their document that topic is restricted with 1000 users. Is that correct or will they allow any number of users to subscribe to the topic? – user10 Aug 10 '16 at 11:06
  • 2
    Topics are not restricted to 1000 users, it's actually the opposite as the API is designed to scale for millions of users. If you can point me to the page that mentions such limit I can check / clarify the documentation. – Diego Giorgini Aug 10 '16 at 12:05
  • just now i created SO post. Please check this. http://stackoverflow.com/questions/38873102/firebase-notification-count-restriction-by-topic-on-rest-api – user10 Aug 10 '16 at 12:11