<tfoot id='JIGmk'></tfoot>
        <legend id='JIGmk'><style id='JIGmk'><dir id='JIGmk'><q id='JIGmk'></q></dir></style></legend>

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

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

      2. 从后台删除应用程序时,Android FCM 未收到通知

        时间:2023-07-30
      3. <legend id='uBIZT'><style id='uBIZT'><dir id='uBIZT'><q id='uBIZT'></q></dir></style></legend>

          <tbody id='uBIZT'></tbody>

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

                <bdo id='uBIZT'></bdo><ul id='uBIZT'></ul>
                1. <small id='uBIZT'></small><noframes id='uBIZT'>

                  <tfoot id='uBIZT'></tfoot>
                2. 本文介绍了从后台删除应用程序时,Android FCM 未收到通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  手机是一加3T.氧气操作系统版本为 4.1.6.当应用程序在后台但在内存中时,应用程序会收到通知.但是当应用程序不在内存中时不会收到通知,即从内存中刷出.即使应用程序不在内存中,也会在具有 android OS 版本 4.2、5.1.1、6.0.1、7.1.1 Lineage OS 的其他设备上收到通知.

                  The phone is OnePlus3T. The oxygen OS build is 4.1.6. App receives notification when the app is in foreground on in background but in the memory. But does not receive notification when the app is not in memory i.e. swiped out of the memory. The notification is received on other devices having android OS verions 4.2, 5.1.1, 6.0.1, 7.1.1 Lineage OS even the app is not in the memory.

                  请提出一些建议.提前致谢.

                  Kindly suggest something. Thanks in advance.

                  推荐答案

                  我也遇到了同样的问题.

                  I also faced the same issue.

                  解决这个问题的两种方法

                  Two ways to solve this issue

                  1- 使用通知负载

                  通知负载可以使用data标签或notification标签发送.

                  notification payload can be send using data tag or notification tag.

                  使用数据标签

                   "data" {
                    "title": "welcome",
                    "description" :"to your app" ,
                    "image" :"image_url",  
                    "deeplink" :"deeplink",
                     - -
                    }
                  

                  它将触发 FirebaseMessagingService onMessageReceived 方法.当应用程序在后台时,它在某些设备上不起作用.

                  it will trigger the FirebaseMessagingService onMessageReceived method. it will not work on some devices, when an app is in the background.

                  使用通知

                   "notification" {
                     "title":"title",
                     "description" : "description",
                     "click_action" :"activity to be open"
                     ..
                  }
                  

                  这是处理android系统尝试并显示通知,这种情况下你的FirebaseMessagingService的onMessageReceived方法将不会调用.即使应用程序在后台,也会显示通知.这样做的一个缺点是 - 您不能自定义通知,因为它是由 Android 系统处理的.更多信息

                  this is handled android system try and show the notification, this case onMessageReceived method of your FirebaseMessagingService will not call.notification will be shown even app is in the background. one disadvantage of this is - you can't the customize notification because it's handled by the Android system. more info

                  2- 在设备设置中启用自动启动

                  2- Enable Auto start in device setting

                  当您使用 data 发送通知并且应用程序被终止时,将不会显示通知.如果你观察日志猫,你会看到

                  when you send notification using data and app is killed notification will not be shown. if you observe the log cat you will see

                  W/GCM-DMM: broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.cabipool (has extras) }
                  

                  可以解决在一加3设置-->应用-->点击齿轮-->最后一个选项应用选择应用自动启动-->找到你的应用启用开关

                  can be solved in oneplus 3 setting -->Apps --> click on gear wheel -->last option App select app auto launch --> find your app enable the switch

                  这是 Vivo、Oppo、小米、华硕、一加 3 等大多数设备的问题.

                  this the problem in most of the devices like Vivo,Oppo,xiaomi,Asus, one plus 3.

                  根据设备制造商启用应用自动启动的步骤.

                  steps to enable app auto launch very based on device manufacturer.

                  更新:

                  一加3和Android 8.0去掉了自动启动选项,现在你可以进入设置>电池>电池优化>(左上角三点菜单)高级优化>关闭高级优化.

                  OnePlus 3 and Android 8.0 the Auto-start option was removed, so now you can go to Settings> Battery> Battery Optimisation> (Three dots menu on the left-top corner) Advanced optimization> Turn off Advanced Optimization.

                  这篇关于从后台删除应用程序时,Android FCM 未收到通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:FCM 通知发送报告 下一篇:何时为用户注册 FCM 令牌

                  相关文章

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

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

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