FCM(Firebase云消息传递)如何发送到所有电话? [英] FCM (Firebase Cloud Messaging) how to send to all Phones?
问题描述
我已经创建了一个小应用程序,可以从FCM控制台接收推送通知。
我现在要做的是向所有人发送推送通知Android手机获得应用程序使用API安装。而这就是我完全迷失的地方。
如果没有收集所有注册ID,是否无法将其发送给所有电话?
这只能用于控制台,不能用于API?
thanx
只能通过Web控制台将消息发送到所有手机,例如您从Firebase Web控制台执行的操作。
如果您需要使用API中的此功能,您可以提交功能请求:
https://firebase.google.com/support/contact/bugs-features/
另一个可能性是让所有的客户端注册到通过 FirebaseMessaging.getInstance()。subscribeToTopic(topicName)
通过这种方式可以发送消息而不需要手动收集注册ID。
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
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.
这篇关于FCM(Firebase云消息传递)如何发送到所有电话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!