Android / Icons / Troubleshooting

A white square instead of your logo in an Android notification: how do you find the cause?

Your logo looks right on the phone's home screen, but becomes a solid square in a notification. Check the source transparency and small icon asset. Using an Icons byFox export, we show the path from a simple symbol to checking files in your app.

1. First, identify which icon you are looking at

The launcher icon represents your app on the home screen. The notification's small icon, specified with setSmallIcon(), is a separate asset. Setting android:icon in the manifest and seeing the correct launcher icon does not confirm that a notification uses the right image.

Start with the code or configuration that actually creates the problematic notification. Note the referenced asset name and the app variant running on your phone. If the app has several ways to send notifications, check that particular path rather than replacing every similarly named file.

2. Test with a simple silhouette

Prepare a monochrome symbol with a transparent surrounding area, such as a bell without a rectangular background. For a small icon, the system uses the shape defined by the alpha channel. If the entire rectangle is opaque, painting the image white will not cut the logo out of it.

In Icons byFox, choose a simple clipart and add the Android Notification format. This gives you a useful reference for comparison with your own file. This export omits the launcher background and decorative badges; your own image still needs correct source transparency.

Compare two tests: a library symbol and your own logo. If the first looks correct and the second produces a square, focus on your source artwork. If both show the same old symbol, check the asset name and installed app variant. This comparison limits the number of settings changed at once.

3. Check the export before copying it

The current Android Notification export from Icons uses a logical icon size of 24 dp. The ZIP contains 24, 36, 48, 72 and 96 pixel PNGs in drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi and drawable-xxxhdpi. These are density variants of one symbol, not five different icons.

Extract the archive into a separate directory and open the PNGs against a background that reveals transparency. Assess both the full image rectangle and the symbol itself. Large transparent margins make the symbol look small even when the file has the correct pixel dimensions. Only then adjust the composition scale and export again.

The Icons documentation examples assume the default name ic_stat_notification. The generator lets you change the export name, so check the actual PNG name and included README. Do not copy a reference to the default asset if your package uses different filenames.

4. Reference the asset where the notification is created

Merge the archive's res directory into the app module's src/main/res directory. With the default name, the native Android reference is setSmallIcon(R.drawable.ic_stat_notification). Do not nest another res directory inside the existing one or replace the app's entire resource directory.

If your Flutter app uses a notification library, check its current documentation for the small icon name. How you pass the name may differ from a native R.drawable reference. Replacing an image does not configure notification channels or notification permissions.

During Flutter app development, keep launcher and notification configuration separate. This prevents a colourful logo update from accidentally overwriting the monochrome symbol used by the system.

5. Check a newly sent notification

Build and run the app with the new asset, then send a new notification through the same path that previously produced the wrong result. Inspect the small symbol in the status bar and notification panel. A large image or avatar inside the notification does not confirm that the small icon is correct.

If the problem remains, return to three questions: does the PNG have a transparent surrounding area, does the code reference the correct name, and is the right app variant running on the device? Keep the simple test symbol until you understand the issue. Then return to a more detailed symbol and assess its legibility at a small size.

Documentation for your next steps

Use installation instructions that match the versions in your project. The sources below cover these topics in more detail.

Have a project to build?

Describe the app you want to build or develop and its current stage. We will establish what information is needed to plan the work.

Let's talk about your project