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

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

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

      1. 关闭应用程序时收听 Firebase 数据库更改

        时间:2023-09-08
        • <bdo id='J2hyd'></bdo><ul id='J2hyd'></ul>
          1. <tfoot id='J2hyd'></tfoot>
              <i id='J2hyd'><tr id='J2hyd'><dt id='J2hyd'><q id='J2hyd'><span id='J2hyd'><b id='J2hyd'><form id='J2hyd'><ins id='J2hyd'></ins><ul id='J2hyd'></ul><sub id='J2hyd'></sub></form><legend id='J2hyd'></legend><bdo id='J2hyd'><pre id='J2hyd'><center id='J2hyd'></center></pre></bdo></b><th id='J2hyd'></th></span></q></dt></tr></i><div id='J2hyd'><tfoot id='J2hyd'></tfoot><dl id='J2hyd'><fieldset id='J2hyd'></fieldset></dl></div>

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

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

                    <tbody id='J2hyd'></tbody>

                  本文介绍了关闭应用程序时收听 Firebase 数据库更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在使用 firebase 创建一个 Ionic 2 应用程序,我需要一种方法来在应用程序关闭时(即在前台、后台和被终止)收听数据库更改(特别是在 child_add 上)

                  I am creating an Ionic 2 app with firebase and I need a way to listen to database changes (specifically on child_added) when the app is closed (I.e. in foreground,background and killed)

                  基本上,我想使用 WebRTC 在应用程序中拨打电话,例如 whatsapp,我正在关注这篇文章 - https://websitebeaver.com/insanely-simple-webrtc-video-chat-using-firebase-with-codepen-demo

                  Basically, I want to use WebRTC to make calls within the app like whatsapp and I am following this post - https://websitebeaver.com/insanely-simple-webrtc-video-chat-using-firebase-with-codepen-demo

                  但是,唯一让我感到困惑的是,当应用程序关闭时它会如何工作.谁能帮我理解一下?

                  However, the only thing that puzzles me is how it will work when the app is closed. Can anyone please help me understand?

                  谢谢!

                  推荐答案

                  使用 Firebase 客户端 SDK 来主动监听数据库更改是不可能的,就像在应用代码运行时一样.

                  It's not possible to actively listen to database changes using the Firebase client SDK in exactly the same way that you can when your app's code is running.

                  如果您希望您的应用接收有关数据库更改的信息,您可以改用 Firebase Cloud Messaging 向您的应用发送通知,其中包含有关更改的信息的小负载.当您的应用收到通知时,它可以决定要做什么.网络支持有一些限制,所以请务必阅读那个.

                  If you want your app to receive information about changes to your database, you can instead use Firebase Cloud Messaging to send your app a notification with a small payload that contains information about the change. When your app receives the notification, it can then make a decision about what to do. There are some limitations with web support, so be sure to read about that.

                  还可以查看 Cloud Functions for Firebase,以便更轻松地编写一些服务器端可以触发以响应数据库更改并在这些更改发生时发送通知的代码.

                  Also look into Cloud Functions for Firebase to make it easier to write some server side code that can trigger in response to a database change and send a notification when those changes happen.

                  这篇关于关闭应用程序时收听 Firebase 数据库更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Angular 2 HTTP 进度条 下一篇:Angular 2 - 从承诺中返回 HTTP

                  相关文章

                  最新文章

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

                  • <bdo id='SMIQK'></bdo><ul id='SMIQK'></ul>

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

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

                    2. <tfoot id='SMIQK'></tfoot>