I'm working on an app and setting up push notifications. Things are working as expected with my notification icon on most devices (including 7.1.1 and 8.1.0 simulator devices). However, on 8.0.0 devices shows a circular solid-color dot instead of the icon when the notification tray is open and a teal-and-white android robot head in the notification strip when the tray is closed (and on other phones a solid dot in the strip instead of the android robot).
AndroidManifest.xml:
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/mynotif"/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notifColor"/>
I started with my icon in mipmap
, but copied them over to drawable
and tried that too - but that had no effect.
Per this I opened and re-saved all my pngs with a background color - but that had no effect.
I've tried fiddling with the notifColor
and I can get the color of the dot to change, but it is still just a solid-color dot.
I don't think it matters for this, but I'm using react-native and react-native-fcm. My compile-sdk and build tools versions are both 26. If the firebase version matters, this is what I have in my app/build.gradle
:
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
How can I get the notification icon to show up correctly in Android 8.0.0?
Update
comparison screenshots of Android 8.0.0 (left) and Android 7.1.1 (right, expected).
I also tried throwing in the icon setting when sending the notifications. It changes the icon to what I set it to on Android 7.1.1/8.1.0, but sticks with the solid-dot on 8.0.0.