About the Android notification icon maker

Android draws a notification's small icon in the status bar and on the notification itself using only its alpha channel. A full-color icon turns into a solid white or grey shape, which is why many apps show a blank square.

This tool makes a white-on-transparent small icon from any Material Symbol, previews it in light and dark notification shades, and downloads the vector drawable, PNGs for every density, an accent color and the Kotlin and Firebase setup code.

How to use it

  1. Pick a symbol, preferably a simple filled shape.
  2. Set the accent color and check the icon in the status bar and on a notification.
  3. Download the zip, copy res into app/src/main and pass the icon to setSmallIcon().

Questions

Why is my Android notification icon a white square?

Since Android 5.0, the small icon is drawn from its alpha channel only. Any opaque pixel becomes white, so an icon with a solid background shows as a square. Use a white shape on a transparent background.

What size should a notification icon be?

24 x 24 dp. As PNGs that is 24 px (mdpi), 36 px (hdpi), 48 px (xhdpi), 72 px (xxhdpi) and 96 px (xxxhdpi). A single vector drawable covers every density.

How do I color the notification icon?

You can't color the status bar icon, but NotificationCompat.Builder.setColor() tints the icon circle on the notification. Use your brand or primary color.

How do I set the notification icon for Firebase Cloud Messaging?

Add meta-data entries com.google.firebase.messaging.default_notification_icon and com.google.firebase.messaging.default_notification_color to the application element in AndroidManifest.xml. FCM uses them for notifications it shows while your app is in the background.