Home » Android » Android notification icon is a white circle

Android notification icon is a white circle

Posted by: admin June 15, 2020 Leave a comment


I’ve got a strange problem with notification icon today.

It looks like this :
enter image description here
(the white circle …)

Did I do something bad ?

Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)

Here is my icon image (freshly downloaded from here https://material.io/icons/#ic_photo) :

Did I miss something ?

For the record, I’m using SDK 24 and only created the hdpi resource folder for now.

Edit #1 : I’ve added the ldpi, mdpi and xhdpi icons, nothing change …

Edit #2 : For more precision, I’m trying to create this notification from a service … FCM messaging service …

How to&Answers:

You must use a notification icon with no background. Android will add the circle background.

You can set background color with


to match your app indentity.

Icon inside will remain white and circle will get the color you defined.

On Android Studio
On system bar
On notification


If your compileSDKversion is above 20 then notification icon should be a white-on-transparent background image. Otherwise the image will be rendered as a white colored image.

Please go through the below link too for guidelines to create the icon


and also the notification icon generator.



It seems to be a problem of cache during compilation … The first image I was using was bad (fully colored), so I think my compilator created somekind of cache on the filename.

I work on Windows and did this : uninstall the app from my phone, invalidate all cache from Android sudio => at re-compilation, the icon was OK.


Note:- If device has android version above 20 you have to generate icon with transparent background and while generating notification use this snippet

int currentapiVersion = android.os.Build.VERSION.SDK_INT;
if (currentapiVersion >= android.os.Build.VERSION_CODES.LOLLIPOP){
} else{

NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)


U need to have separate icon generated which will be white version of your launcher icon. U can use below link to generate such icon.


Note : You need to upload PNG image of your launcher icon with transparent background.

For setting icon u can have a method like this

private int getSmallIconForNotification(){
    return (Build.VERSION.SDK_INT>Build.VERSION_CODES.LOLLIPOP)? R.mipmap.ic_stat_launcher : R.mipmap.ic_launcher;

Code usage:

private NotificationCompat.Builder createNotificationBuilder(){
    return new NotificationCompat.Builder(this)
            .setContentTitle("New Message")
            .setContentText("Hi there.....")