Search code examples
androidxamariniconsxamarin.formsapplication-icon

How to check if an Android OS is forcing an application icon background color?


I am working with a team to develop a cross-platform application on mobile, and we're using Visual Studio 2015 and Xamarin.Forms v2.3.2.127.

We have already created the application icons that we need for the three different platforms (Android, iOS, UWP) and each one follows the native platform specifications.

There's only one more problem that we have faced, and I would like to know if there's any answer for my problem. Some of the devices that run Android OS forces the application icon to have a squared background, and they seem to give arbitrarily colours for the background (please check the image afterwards). We don't want to change the application icon by itself for Android so we're looking for a better way.

Is there any way in Xamarin to be able to detect that the device is adding a coloured background for the application icon so we can provide it with the icon that we want, or at least change the colour the device is going to use?

Home Page of Leagoo Z5 mobile

As you can see, Whatsapp, Facebook and Dropbox icons are all modified and given a squared coloured background.

Thanks in advance for any help that could be given.
Regards, Paul.


Solution

  • This is a custom launcher / icon pack's doing. Most likely the manufacturer's doing(LEAGOO). You may notice that "Known" apps will have a custom icon, but if you created a custom app it might look much different with a random background and perhaps an icon transformation of some sort.

    It might be worth getting a stock Android device to ensure your Icon looks great on stock Android as you'll never know what different launchers(bloatware) will do to your app's icon.

    If the OEM has a way to interop with it, then by all means that would be the easiest way to customize this behavior. However most launchers are included in the OEM's package/bloatware.