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"/>
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With