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.stack.imgur.com/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.
To receive the Device Token (and updates to the token value) and push notifications, you must create a custom class that extends FirebaseMessagingService . The onNewToken callback fires whenever a new token is generated.
<!-- 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
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