I recompiled an application that I had made in 2018 due to a problem that arose when I changed my cell phone and the icon that previously showed well now shows the transparent part white. In the image it is seen how the old version is shown well and in the new one it does not.
@Know_About_IT The image I uploaded is on the new device. The old app looks good and the new one with the same image looks bad. What I modify is the address of the internal storage to the new system due to the issue of permissions in android 10 to be able to load a table. My cell phone in case it helps them is a xiaomi redmi note 9 pro
@Faraz_Firoz that image still shows the transparent part as white
Anke I've been looking at the adaptive icons but I don't understand how I should modify it since png use only one layer. I read in another post about icons that the images have to have more resolution, and I tried to create a new one of 512x512 and it still looks bad.
I also tried downloading any image with transparencies from the web and the result is the same.
To give a launcher icon a transparent background in Android 8+ (API ≥ 26), your app has to target API 25 or lower. But if your app is published on the Play Store, all apps must currently target Android 10 (API 29). From Aug 2021 it must target Android 11 for new apps (and from Nov 2021 also for updates).
So it is no longer possible to get a transparent background for the launcher icon if your app is to be published in the Play Store.
Hi MarioDD, Anke is 101% right - your icon cannot have transparency for modern Android.
So you will need to redesign it without any transparency. If you create a master png image 1024 x 1024 pixels in size, the compiler will create all of the resolutions, shapes and sizes required (which is quite a few, some of which also need an XML file). Note this should only be done in the final build and you should never try to run the Companion with the master image in situ.