Firebase多播云混乱 [英] Firebase multicast cloud messging

查看:70
本文介绍了Firebase多播云混乱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实现Firebase云消息传递的服务器端实现.这是用于根据主题发送消息的正文内容.

I am trying to implement the server side implementation of firebase cloud messaging. This is the body content for sending message based on topic.

{
"to" : "/topics/topic_name",
  "priority" : "high",
  "data" : {
    "message" : "Actual message for notification",
    "title" : "Title"
  }
}

我想知道的是如何为一组注册ID发送上述消息.到"字段是一个字符串,而不是字符串数组.即,我可以将消息一一发送到注册ID.使用GCM,我们可以将消息发送到ID组.

What i want to know is how to send the above message for a group of reg ids. To field is a string not an array of string. ie., i can send message to reg ids one by one. With GCM we can send the messages to group of ids.

此外,发送多播消息的限制是多少.(每条消息1000个注册ID).

Also what is the limit for sending multicast messages. (1000 reg ids per message).

请让我知道我是否缺少某些东西.

Kindly let me know if i am missing something.

推荐答案

是的,使用Firebase,我们可以将消息发送到多个注册ID.语法是

Yes with Firebase we can send messages to multiple registration ids. The syntax is

{
"registration_ids":["red_id1","reg_id2",...],
"to" : "/topics/topic_name",
  "priority" : "high",
  "data" : {
    "message" : "Actual message for notification",
    "title" : "Title"
  }
}

关于限制,我认为Firebase Notification Service中对于多播消息传递没有限制

Regarding limits I think there is no limit in Firebase Notification Service for multicast messaging

这篇关于Firebase多播云混乱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆