0

i am working on push notification in which my app icon is showing correctly in foreground in all android versions,But the problem is that when my app goes in Background the notification icon is showing total white in all android version weather its lollipo or greater.,I have used transparent icon also and tried lot of solutions but didn't work anyone i dont know why?

Thank you in advance

Dimensions

MDPI:-24*24

HDPI:-36*36

XHDPI:-48*48

XXHDPI:-72*72

MyFirebaseMessagingService.class

 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
    {
        notificationBuilder.setSmallIcon(R.drawable.notification_logo)
                .setContentTitle(title)
                .setContentText(messageBody)
                .setAutoCancel(true)
                .setSound(defaultSoundUri)
                .setContentIntent(pendingIntent);
    } else
    {
        notificationBuilder.setSmallIcon(R.drawable.notification_logo)
                .setContentTitle(title)
                .setContentText(messageBody)
                .setAutoCancel(true)
                .setSound(defaultSoundUri)
                .setContentIntent(pendingIntent);
    }

Notification panel enter image description here

Community
  • 1
  • 1
Sunil
  • 3,203
  • 1
  • 27
  • 37
  • 1
    What is the difference between the code of If and Else block? These two are exactly same. @Sunil – Ankita Sep 15 '17 at 05:35
  • @Ankita yes i know this is wrong ,so how can i solve my problem? – Sunil Sep 15 '17 at 05:47
  • 1
    Follow this link https://stackoverflow.com/questions/30795431/icon-not-displaying-in-notification-white-square-shown-instead – Ankita Sep 15 '17 at 05:52

0 Answers0