【问题标题】:Android FCM push notification icon not showing in oreo devicesAndroid FCM 推送通知图标未在 oreo 设备中显示
【发布时间】:2018-08-27 04:23:38
【问题描述】:

我正在使用 FCM 向用户发送推送通知。当应用程序在前台时,通知图标显示,但当应用程序在后台时,只显示白色圆圈。这个问题只存在于奥利奥设备中。清单文件:-

<meta-data
        android:name="com.google.firebase.messaging.default_notification_icon"
        android:resource="@drawable/ic_stat_name" />
<meta-data
        android:name="com.google.firebase.messaging.default_notification_color"
        android:resource="@color/notcolor" />
<meta-data
        android:name="com.google.firebase.messaging.default_notification_channel_id"
        android:value="fcm_default_channel"/>

【问题讨论】:

标签: android firebase firebase-cloud-messaging


【解决方案1】:

您可能正在使用过时的 firebase 消息 SDK (

自 12.0.0 起已修复

dependencies {
  // ...
  compile "com.google.firebase:firebase-messaging:12.0.0"
}

您可以查看release note

修复了导致自定义通知图标出现问题的回归问题 在 Android 8.0 上被拒绝。

【讨论】:

  • 我在使用 FCM 17.3.0 版时遇到了同样的问题。
猜你喜欢
  • 1970-01-01
  • 2021-09-13
  • 2019-03-31
  • 1970-01-01
  • 2017-04-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多