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

      1. <legend id='sCho9'><style id='sCho9'><dir id='sCho9'><q id='sCho9'></q></dir></style></legend>

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

        如何通过 Firebase 从用户向用户发送直接消息?

        How to send direct message via Firebase from user to user?(如何通过 Firebase 从用户向用户发送直接消息?)

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

          <legend id='5pCqS'><style id='5pCqS'><dir id='5pCqS'><q id='5pCqS'></q></dir></style></legend>

                  <tbody id='5pCqS'></tbody>
                • <bdo id='5pCqS'></bdo><ul id='5pCqS'></ul>
                  <tfoot id='5pCqS'></tfoot>

                  <small id='5pCqS'></small><noframes id='5pCqS'>

                  本文介绍了如何通过 Firebase 从用户向用户发送直接消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我真的是新手,需要建议.

                  I am really rookie and need an advice.

                  我已阅读文档,据我所知,如果您需要发送直接消息,请关注下一步:

                  I have read documentation, and as far as i understood if you need send direct message, follow next steps:

                  1. 进行身份验证,最终获得 Firebase TokenIduserId
                  2. 将它们发送到您的服务器端并将其存储在数据库中
                  3. 当您要发送消息时,您需要创建 json 并放入topic textresipent userId 等等...
                  4. 通过 HTTP 将此 json 发送到您的服务器端
                  5. 当服务器检索到这个 json 时,它应该使用 Firebase API 来在 firebase 中创建具有随机名称的新消息块 child
                  6. 最终服务器必须通过我们从消息中获得的 userId 在 DB 中找到 recipent 用户.
                  7. 服务器会通过 userId 找到当前的 recipent 用户,接下来我们应该使用 firebase tokenId 来发送通知.
                  8. 并使用此类数据发送配方用户通知 - 新名称消息块 child
                  9. 收件人将连接到此当前区块并检索数据
                  1. Make authentification, eventually you get Firebase TokenId and userId
                  2. Send them to your server side and store it in DB
                  3. When you are going to send a message you need create json and put inside topic text and resipent userId so on...
                  4. Send this json via HTTP to your server side
                  5. When server retrive this json, it should use Firebase API to create new message bloc child with random name in firebase
                  6. Eventually server have to find recipent user in DB by userId that we get from message.
                  7. After server will find current recipent user by userId , next we should take firebase tokenId In order to sent notification .
                  8. And send recipent user notification with such data - name of new message bloc child
                  9. Recipent will connect to this current bloc and retrive data

                  这是我理解的这个概念,如果有错误请纠正我?

                  It is as i understood this consept, fix me please if smth wrong?

                  推荐答案

                  您建议的方法听起来不错.要实现的最重要的事情是您需要应用服务器将下游消息发送到设备.使用数据库作为应用程序和应用程序服务器之间的通信机制是一种流行的方法.

                  Your suggested approach sounds good. The most important thing to realize is that you require an app server to send a downstream message to a device. Using the database as the communication mechanism between the app and the app server is a popular approach.

                  您还可以使用 云消息传递的上游功能.但我从未尝试过这种方法,因为数据库对我来说很好用,而且我对学习另一种协议 (XMPP) 没什么兴趣.

                  You could also use Cloud Messaging's upstream capabilities. But I've never tried that approach, because the database works fine for me and I had little interest in learning yet another protocol (XMPP).

                  您可以在这篇 Firebase 博客文章中了解我是如何实现它的 在具有 Firebase 数据库和云消息传递的 Android 设备之间发送通知.

                  You can read how I implemented it in this Firebase blog post Sending notifications between Android devices with Firebase Database and Cloud Messaging.

                  这篇关于如何通过 Firebase 从用户向用户发送直接消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                    <bdo id='ye0ck'></bdo><ul id='ye0ck'></ul>

                  • <small id='ye0ck'></small><noframes id='ye0ck'>

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

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

                            <tfoot id='ye0ck'></tfoot>