androidpush-notificationandroid-drawableandroid-mipmap

Notification not show icon in case of using mipmap


I am handling FCM and Add these metadata to define icon and color for Notification when i use mipmap icon it does not work and display filled rectangle when I use drawable image it is being displayed

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




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

with mipmap with  mipmap

with drawable

with drawable


Solution

  • Problem is Notification icons must have transparent background more explanation

    Solution: if you have not a designer you can use this link Image to transparent to get image with transparent background then you use this to get all drawable dimensions get image drawables