Eric Osman
Eric Osman

Reputation: 65

Android Firebase notification gives default icon

I have a problem with my Firebase notification icon. Until now it only shows a default android icon when I sent a notification. It looks like this:

https://i.sstatic.net/jbIpj.jpg

But that is not even an icon I use. I changed the icons multiple times in "Image assets" but it keeps comming up like this...

What am I doing wrong? Because the only thing I can find on the internet is that people get a gray icon instead of their own.

Upvotes: 6

Views: 8081

Answers (1)

Akash Patel
Akash Patel

Reputation: 3141

<!-- Set custom default icon. This is used when no icon is set for incoming notification messages.
     -->
<meta-data
    android:name="com.google.firebase.messaging.default_notification_icon"
    android:resource="@drawable/ic_stat_ic_notification" />
<!-- Set color used with incoming notification messages. This is used when no color is set for the incoming
     notification message.  -->
<meta-data
    android:name="com.google.firebase.messaging.default_notification_color"
    android:resource="@color/colorAccent" />

Check this link for more details https://firebase.google.com/docs/cloud-messaging/android/receive

Upvotes: 10

Related Questions