I'm using Firebase Cloud Messaging to send notifications to my Flutter app. It works fine but my app icon notification is grey on the Google Pixel XL. I can see the outline, but for some reason, it's still grey. I've read in different articles that it has to do with the Android SDK level, but the minSdkVersion in Flutter is already 16 (less than 21) so I don't understand why the color won't show on.
So is it possible to show my app icon for notifications with the color?
--Thanks in advance
Here you can read:
Try putting that in your
AndroidManifest.xml
You can find more info here.
You also need to have your
colorAccent
define. You can create acolors.xml
file in your res folder like that:In this folder:
/android/app/src/main/res/values
Also the icon must be in the
drawable
folder.But remember that this icon must be
white
with a transparent background.For some type of icons to be colored you need on some device sets
meta-tags
you already added in yuorAndroidManifest.xml
and your icon must follow some specifications (must be white in a transparent background). You can try to generate one here. Give it a try. Remember to put it on drawable folder and update the manifestmeta-tag
icon name.Read also this SO question that stengthens up what I've said here.
I've tried on the Pixel 2 emulator running API level 27:
Hope it helps.