• <bdo id='AgyfN'></bdo><ul id='AgyfN'></ul>
      <legend id='AgyfN'><style id='AgyfN'><dir id='AgyfN'><q id='AgyfN'></q></dir></style></legend>

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

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

      如何向特定的 Android 用户组发送 Firebase 推送通知

      时间:2023-07-29

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

              <tbody id='mkuas'></tbody>

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

                <bdo id='mkuas'></bdo><ul id='mkuas'></ul>
                本文介绍了如何向特定的 Android 用户组发送 Firebase 推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我已经使用 Firebase 创建了推送通知服务,我可以向具有 FCM id 的所有或单个用户发送通知,但我不知道如何发送给特定用户.

                I Have created push notification service using Firebase and I can send notification to either all or single user having FCM id, but I have no idea how to send to specific user.

                服务器面板也不是为处理推送通知而创建的,如果有任何建议会有所帮助.

                Also server panel is not created for handling push notification handling If any suggestion for that is there will help more.

                推荐答案

                Firebase 云消息传递 (FCM) 主题消息传递允许您向已选择加入特定主题的多个设备发送消息.基于发布/订阅模型,主题消息支持每个应用程序的无限订阅,即您的组附加到特定主题,如新闻组、体育组等.

                Firebase Cloud Messaging (FCM) topic messaging allows you to send a message to multiple devices that have opted in to a particular topic. Based on the publish/subscribe model, topic messaging supports unlimited subscriptions for each app i.e your group is attached to specific topic like news group,sports group etc.

                FirebaseMessaging.getInstance().subscribeToTopic("news");
                

                取消订阅unsubscribeFromTopic("news")

                从服务器端,您需要设置特定主题,即一组用户,如下所示:

                From Server side you need to set up for specif topic i.e a group of user like this:

                https://fcm.googleapis.com/fcm/send
                Content-Type:application/json
                Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA
                
                {
                  "to": "/topics/news",
                  "data": {
                    "message": "This is a Firebase Cloud Messaging Topic Message!",
                   }
                }
                

                "/topics/news" 这将向订阅新闻主题的人群发送通知

                "/topics/news" This will send notification to group of people who have subsribe the news topic

                这篇关于如何向特定的 Android 用户组发送 Firebase 推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:带有 FCM 令牌的设备的 Firebase 通知说已发送但未收到 下一篇:Firebase 实例 ID:在 21.0.0 中弃用 getId()

                相关文章

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

                    <bdo id='oWI3J'></bdo><ul id='oWI3J'></ul>

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