【发布时间】:2017-01-18 19:00:31
【问题描述】:
要使用 FCM 设置默认图标,我们可以在 Android 清单中添加一个元标记。我的当前如下所示,因为我想在接收推送通知时使用我的应用程序的图标作为通知图标:
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/ic_logo_launcher" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorAccent" />
请注意,我正在从 mipmap 文件夹中获取 ic_logo_launcher.png。这是可取的吗?
【问题讨论】:
-
我把它放在drawable中检查这个链接stackoverflow.com/questions/28065267/mipmap-vs-drawable-folders但我仍然认为你的问题很好。
标签: android firebase android-notifications firebase-cloud-messaging android-mipmap