0

As it is known, since Android Lollipop the notification icon in the top bar is white, c.f. here Notification bar icon turns white in Android 5 Lollipop.

Interestingly, this does not happen in my app. This is my code

 NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this);
        mBuilder.setSmallIcon(R.mipmap.logo)
                .setContentTitle(remoteMessage.getData().get("title"))
                .setContentText(remoteMessage.getData().get("body"))
                .setVibrate(pattern)
                .setGroup(NEW_RESULT_GROUP)
                .setAutoCancel(true);

R.mipmap.logo is a coloured logo I use as starter icon. I expected to see a white version of it, or a white square, but what appeared was the full logo in all its colours.

Why does that happen?

EDIT: I use the Firebase Console/Api to send the notifications. Maybe this is a hint?

Forgot to mention the minSDK and targetSDK.

minSdkVersion 14

targetSdkVersion 23

compileSdkVersion 23

Community
  • 1
  • 1
Merlin1896
  • 1,751
  • 24
  • 39
  • can you tell me what is `minSdkVersion` and `targetSdkVersion`. – Harshad Pansuriya Jul 17 '16 at 11:35
  • Is your app running on Lollipop or above? And you can change the Notification Icon with this API: https://developer.android.com/reference/android/app/Notification.Builder.html#setColor(int) – Swordsman Oct 25 '16 at 05:56

0 Answers0