0
votes

After integrating firebase, I noticed that the notification icon was a white/grey square, so I generated a notification icon with Image Asset Studio as explained in this guide:

https://developer.android.com/studio/write/image-asset-studio.html#create-notification

The notification icon is this (it's white, select the image and download it to see it):

enter image description here

As you can see, it follows the rules, and it's located on the places in which the wizard stored it by default, drawable-density... etc

The problem is that when I launch a PUSH from firebase, the noficiation icon is still a white/grey square, so something is going wrong and it's not using that icon for notifications.

Is there something more that it's necessaary to do to apply that icon to notifications automatically?

1

1 Answers

4
votes
<meta-data android:name="com.google.firebase.messaging.default_notification_icon"
    android:resource="@drawable/ic_stat_ic_notification" />

This goes to the AndroidManifest file that overrides the default icon.

If needed to override default notification color as well:

<meta-data android:name="com.google.firebase.messaging.default_notification_color"
    android:resource="@color/google_blue" />