【发布时间】:2018-03-09 11:45:25
【问题描述】:
我们的目标是从我们的后端向设备组发送通知,并且只有从服务器端才能知道哪个设备应该接收通知。
我们已经对 AppCenter 进行了一些尝试,因为我们主要使用 Xamarin iOS/Android/Forms,但现在我们怀疑直接使用 Firebase API 可能更好,因为它更广泛、更强大。
我发现新版本的 API (HTTP V1) 无法向令牌列表发送通知,该功能在旧版 API 中使用 registration_ids 参数 (https://firebase.google.com/docs/cloud-messaging/send-message) 提供。
设备组名称(仅限旧协议)
我不能使用主题,因为在发送通信时,服务器负责为通知准备“邮件列表”。
我正在考虑使用设备群消息 (https://firebase.google.com/docs/cloud-messaging/android/device-group),但这些是旧 API 的一部分,我不确定它是否有意义/是否可以将它们与新版本的 API 一起使用。
是否可以选择将一批 100-200-500 个推送通知发送到一个令牌?理论上,可以发送的通知没有限制,但我担心发送太多通知可能会被禁止。
使用旧版 API 会更好吗? AppCenter (Microsoft) 也使用旧版 API,这很明显是因为设置的工作原理,并且因为从 AppCenter 的控制台可以将通知发送到令牌列表,而 Firebase 控制台上不提供该功能。
另一个人刚刚问了类似的问题,但答案是使用主题 (How to send firebase notification for all user at a time?)。
【问题讨论】:
标签: firebase push-notification firebase-cloud-messaging visual-studio-app-center