1. <tfoot id='4tbo4'></tfoot>
        <bdo id='4tbo4'></bdo><ul id='4tbo4'></ul>
    2. <legend id='4tbo4'><style id='4tbo4'><dir id='4tbo4'><q id='4tbo4'></q></dir></style></legend>

      <small id='4tbo4'></small><noframes id='4tbo4'>

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

      使用 Firebase 通知作为通知图标的灰色方块

      Grey square as notification icon using Firebase notifications(使用 Firebase 通知作为通知图标的灰色方块)
    4. <legend id='W1syF'><style id='W1syF'><dir id='W1syF'><q id='W1syF'></q></dir></style></legend>

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

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

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

                  <tbody id='W1syF'></tbody>
              1. 本文介绍了使用 Firebase 通知作为通知图标的灰色方块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试将 Firebase Cloud Messaging 集成到我的 Android 应用程序中.但是当应用程序在后台或关闭时,Firebase 通知会显示为灰色方形图标,而不是我的应用程序的启动器图标.

                I am attempting to integrate Firebase Cloud Messaging into my android app. But when the app is in the background or closed, Firebase notification is displayed with grey square icon instead of my application's launcher icon.

                如何在不实现 Firebase 服务器 API 和发送数据消息的情况下将通知图标作为我的应用程序徽标?

                How could I make the notification icon to be my application logo, without implementing Firebase server API and sending data messages?

                推荐答案

                从 Firebase 9.8.0 开始,可以通过在 Manifest 中添加相关信息来更改此图标:

                From Firebase 9.8.0 it is possible to change this icon, by adding info about this in Manifest:

                <meta-data
                        android:name="com.google.firebase.messaging.default_notification_icon"
                        android:resource="@drawable/ic_stat_ic_notification" />
                    <meta-data
                        android:name="com.google.firebase.messaging.default_notification_color"
                        android:resource="@color/colorAccent" />
                

                您可以在此处找到示例:

                Example you will find here:

                https://github.com/firebase/quickstart-android/blob/master/messaging/app/src/main/AndroidManifest.xml

                这篇关于使用 Firebase 通知作为通知图标的灰色方块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                When does a FCM token expire?(FCM 令牌何时到期?)
                Firebase Cloud Messaging (FCM) - Launch Activity when user clicks the notification with extras(Firebase Cloud Messaging (FCM) - 当用户点击带有附加功能的通知时启动活动)
                Implement Firebase inside of a Library(在库中实现 Firebase)
                Firebase Backward compatibility with GCM(Firebase 与 GCM 的向后兼容性)
                Receiving the FCM notifications multiple times on Nougat(在 Nougat 上多次接收 FCM 通知)
                Firebase FCM MismatchSenderID(Firebase FCM 不匹配SenderID)

                    <tfoot id='lRckF'></tfoot>

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

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

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