• <legend id='xL9LZ'><style id='xL9LZ'><dir id='xL9LZ'><q id='xL9LZ'></q></dir></style></legend>

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

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

        FCM for android:应用程序在后台时弹出系统通知

        时间:2023-07-29

          <tbody id='t3NAT'></tbody>

      1. <small id='t3NAT'></small><noframes id='t3NAT'>

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

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

                1. 本文介绍了FCM for android:应用程序在后台时弹出系统通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  是否可以在屏幕顶部显示 Firebase 系统通知的弹出窗口(当应用程序在后台时)?为此,我使用 setPriority(Notification.PRIORITY_MAX) 在前台显示来自 onMessageReceived 的通知.

                  Is it possible to show popup for firebase system notification (when app is in background) on the top of screen? I use setPriority(Notification.PRIORITY_MAX) for this to show notifications from onMessageReceived in foreground.

                  我同时使用 notificationdata 字段,因此我无法访问前台收到的通知.我尝试将 priority 设置为 high 并使用仅通知推送 - 没有任何帮助.

                  I use both notification and data fields, so I don't have access to received notification in foreground. I've tried setting priority to high and using notification-only pushes - nothing helps.

                  推荐答案

                  只有当你的应用在后台使用dataonMessageReceived中的消息> 仅有效载荷.

                  It is only possible to handle the message in onMessageReceived when your app is in background when using a data only payload.

                  在您的有效负载中同时使用 notificationdata 时,预期的行为是 Android 系统将在应用程序处于后台时处理通知,无论是什么priority 的值.

                  When using both notification and data in your payload, the expected behavior is that the Android System will handle the notification when the app is in background, regardless of what is the value of your priority.

                  有关更多信息,请参阅 处理 Android 消息 上的官方文档详情.

                  See the official docs on Handling Android Messages for more details.

                  这篇关于FCM for android:应用程序在后台时弹出系统通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何跟踪 FCM 推送通知发送表单服务器端或 Rest 客户端? 下一篇:Firebase 推送通知与 childAdd 监听器

                  相关文章

                2. <i id='stDi1'><tr id='stDi1'><dt id='stDi1'><q id='stDi1'><span id='stDi1'><b id='stDi1'><form id='stDi1'><ins id='stDi1'></ins><ul id='stDi1'></ul><sub id='stDi1'></sub></form><legend id='stDi1'></legend><bdo id='stDi1'><pre id='stDi1'><center id='stDi1'></center></pre></bdo></b><th id='stDi1'></th></span></q></dt></tr></i><div id='stDi1'><tfoot id='stDi1'></tfoot><dl id='stDi1'><fieldset id='stDi1'></fieldset></dl></div>
                    <legend id='stDi1'><style id='stDi1'><dir id='stDi1'><q id='stDi1'></q></dir></style></legend>
                  1. <small id='stDi1'></small><noframes id='stDi1'>

                  2. <tfoot id='stDi1'></tfoot>
                      • <bdo id='stDi1'></bdo><ul id='stDi1'></ul>