1. <i id='IXxEW'><tr id='IXxEW'><dt id='IXxEW'><q id='IXxEW'><span id='IXxEW'><b id='IXxEW'><form id='IXxEW'><ins id='IXxEW'></ins><ul id='IXxEW'></ul><sub id='IXxEW'></sub></form><legend id='IXxEW'></legend><bdo id='IXxEW'><pre id='IXxEW'><center id='IXxEW'></center></pre></bdo></b><th id='IXxEW'></th></span></q></dt></tr></i><div id='IXxEW'><tfoot id='IXxEW'></tfoot><dl id='IXxEW'><fieldset id='IXxEW'></fieldset></dl></div>
        <bdo id='IXxEW'></bdo><ul id='IXxEW'></ul>

    2. <legend id='IXxEW'><style id='IXxEW'><dir id='IXxEW'><q id='IXxEW'></q></dir></style></legend>
    3. <tfoot id='IXxEW'></tfoot>

    4. <small id='IXxEW'></small><noframes id='IXxEW'>

        计算 Firebase 云消息传递中某个主题的订阅者

        Count subscribers of a topic in Firebase Cloud Messaging(计算 Firebase 云消息传递中某个主题的订阅者)
        <legend id='WiICq'><style id='WiICq'><dir id='WiICq'><q id='WiICq'></q></dir></style></legend>
      1. <small id='WiICq'></small><noframes id='WiICq'>

        <tfoot id='WiICq'></tfoot>
          <bdo id='WiICq'></bdo><ul id='WiICq'></ul>

            <i id='WiICq'><tr id='WiICq'><dt id='WiICq'><q id='WiICq'><span id='WiICq'><b id='WiICq'><form id='WiICq'><ins id='WiICq'></ins><ul id='WiICq'></ul><sub id='WiICq'></sub></form><legend id='WiICq'></legend><bdo id='WiICq'><pre id='WiICq'><center id='WiICq'></center></pre></bdo></b><th id='WiICq'></th></span></q></dt></tr></i><div id='WiICq'><tfoot id='WiICq'></tfoot><dl id='WiICq'><fieldset id='WiICq'></fieldset></dl></div>

                  <tbody id='WiICq'></tbody>

                1. 本文介绍了计算 Firebase 云消息传递中某个主题的订阅者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想对我的应用做的是:用户可以选择不同的兴趣,并且一旦有超过 5 人对同一事物感兴趣,我想向他们发送通知.

                  What I want to do with my app is this: users can select different interests and as soon as there are more than ~5 people interested in the same thing, I want to send them a notification.

                  我认为 Firebase + Topics 将是一个不错的选择.

                  I thought Firebase + Topics would be a good choice for this.

                  但是我如何知道有多少人订阅了一个主题?

                  But how do I find out how many people have subscribed to a topic?

                  推荐答案

                  没有可用的 API 来检查一个主题有多少订阅者.(查看我的回答这里)

                  There is no available API to check how many subscribers a topic has. (see my answer here)

                  您必须在服务器端实现映射,保存主题名称并添加到订阅者列表中.订阅后,添加新订阅者,检查计数(看看它是否在您的首选数字内),然后触发通知.

                  You'll have to implement the mapping on your server-side, saving the name of the topics and adding in the list of subscribers. Upon subscription, add the new subscriber, check the count (see if it's within your preferred number), then trigger a notification.

                  这篇关于计算 Firebase 云消息传递中某个主题的订阅者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  When does a FCM token expire?(FCM 令牌何时到期?)
                  Firebase Cloud Messaging (FCM) - Launch Activity when user clicks the notification with extras(Firebase Cloud Messaging (FCM) - 当用户点击带有附加功能的通知时启动活动)
                  Implement Firebase inside of a Library(在库中实现 Firebase)
                  Firebase Backward compatibility with GCM(Firebase 与 GCM 的向后兼容性)
                  Receiving the FCM notifications multiple times on Nougat(在 Nougat 上多次接收 FCM 通知)
                  Push Notifications are delivered but didReceiveRemoteNotification is never called Swift(推送通知已交付,但 didReceiveRemoteNotification 从未被称为 Swift)

                  <small id='J7HQ4'></small><noframes id='J7HQ4'>

                  1. <tfoot id='J7HQ4'></tfoot>

                    • <i id='J7HQ4'><tr id='J7HQ4'><dt id='J7HQ4'><q id='J7HQ4'><span id='J7HQ4'><b id='J7HQ4'><form id='J7HQ4'><ins id='J7HQ4'></ins><ul id='J7HQ4'></ul><sub id='J7HQ4'></sub></form><legend id='J7HQ4'></legend><bdo id='J7HQ4'><pre id='J7HQ4'><center id='J7HQ4'></center></pre></bdo></b><th id='J7HQ4'></th></span></q></dt></tr></i><div id='J7HQ4'><tfoot id='J7HQ4'></tfoot><dl id='J7HQ4'><fieldset id='J7HQ4'></fieldset></dl></div>
                      • <bdo id='J7HQ4'></bdo><ul id='J7HQ4'></ul>
                          <tbody id='J7HQ4'></tbody>

                            <legend id='J7HQ4'><style id='J7HQ4'><dir id='J7HQ4'><q id='J7HQ4'></q></dir></style></legend>