1

So the Android documentation says that app icons (mipmap) is converted into to notification bar icon by putting a white filter on all pixels not transparent. The problem is I need white color in the icon (when it's on the phone screen full size) but the white should be removed when shown in the status (notification) bar.

Since there isn't a separate image for notification icons I am a bit lost on how to do this.

Thanks

KasparTr
  • 2,328
  • 5
  • 26
  • 55
  • What exactly makes you think there is no separate image for notification icons? Nofication Builder https://developer.android.com/reference/android/app/Notification.Builder.html should let you set whatever notification icon you want :) – daemontus Nov 27 '16 at 15:05
  • Where should I do the building. Should I create a new builider in the onMessageReceived method in the service or once in the main activities onCreate? – KasparTr Nov 27 '16 at 18:26

1 Answers1

0

The awnser to my question can be found here.

I will bring it out here as well:

If you are dealing with a Remote Message like firebase notification then you dont need to use any notification builder to change the icon or the background color but you can just specify the icon in the AndroidManifest:

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

Note please that this can be done from FB SDK v9.8 and up though.

Community
  • 1
  • 1
KasparTr
  • 2,328
  • 5
  • 26
  • 55