1

I'm having a problem with my app's notification icon (in Android 7). Instead of showing the full icon image, the system displays only the background of the icon (see attached image). I guess it's something with the icon, any idea what should I fix? Thanks!

enter image description here

Edit: code example

NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
    builder.setContentTitle(title)
            .setContentText(message)
            .setSmallIcon(R.mipmap.ic_launcher)
            .setAutoCancel(true)
            .setOngoing(false)
            .setTicker(message)
            .setContentIntent(pendingIntent);
    android.app.Notification notification = new NotificationCompat.BigTextStyle(builder)
            .bigText(message).build();
Sharas
  • 1,985
  • 3
  • 20
  • 43

2 Answers2

0

You need to use smallIcon to get this one and LargeIcon to get the full one.

liege30
  • 11
  • 3
0

It's not possible to have an colorful small icon, but using builder.SetColor(int resId), you can set the background color of the icon and the title text color. This is why Facebook's icon looks good (one background color, and the icon itself is white), while other icons with more then one color, look like in my example

Sharas
  • 1,985
  • 3
  • 20
  • 43