Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android FCM push notification icon not showing in oreo devices

I am using FCM to send push notification to the user. Notification icon shows when the app in the foreground, but when the app is in the background only white circle is showing. This problem exists only in oreo devices. Manifest file:-

<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"/>
like image 843
Abhishek c Avatar asked Jan 02 '26 00:01

Abhishek c


1 Answers

You may be using an outdated firebase messaging SDK (<12)

It has been fixed since 12.0.0

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

You can check the release note

Fixed a regression that caused custom notification icons to be rejected on Android 8.0.

like image 137
anni Avatar answered Jan 03 '26 14:01

anni



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!