Android FCM推送通知图标未显示在oreo设备中

时间:2018-03-18 14:19:38

标签: android firebase firebase-cloud-messaging

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

<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"/>

1 个答案:

答案 0 :(得分:4)

您可能正在使用过时的firebase消息传递SDK(&lt; 12)

自12.0.0以来已修复

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

您可以查看release note

  

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

相关问题