App Not Using Launcher Icons

Nathan Sokalski 4,126 Reputation points
2021-06-01T22:49:06.03+00:00

I am working on creating the launcher icons for my app, but it doesn't seem to be using them. I have edited the ic_launcher.png files in the following folders:

mipmap-hdpi
mipmap-mdpi
mipmap-xhdpi
mipmap-xxhdpi
mipmap-xxxhdpi

The edited images are still the same size, and are marked as AndroidResource. All I want are the images in the ic_launcher.png files (I do not need any of the mask, background, foreground, round, etc.). All the folders still have the ic_launcher_foreground.png & ic_launcher_round.png files, and the mipmap-anydpi-v26 folder contains ic_launcher.xml & ic_launcher_round.xml, both of which contain the following:
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@Color /ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
All I want is to use the ic_launcher.png files, so I don't know if I should be deleting the other *.png files, changing any files/configurations, or something else. What should I do?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,337 questions
{count} votes

Accepted answer
  1. JessieZhang-MSFT 7,706 Reputation points Microsoft Vendor
    2021-06-02T07:13:38.237+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    There are two cases you deal with when working with images in Android:

    • You want to load an image for your device density and you are going to use it “as is”, without changing its actual size. In this case you should work with drawables and Android will give you the best fitting image.
    • You want to load an image for your device density, but this image is going to be scaled up or down. For instance this is needed when you want to show a bigger launcher icon, or you have an animation, which increases image’s size. In such cases, to ensure best image quality, you should put your image into mipmap folder. What Android will do is, it will try to pick up the image from a higher density bucket instead of scaling it up.

    Thus, the rule of thumb to decide where to put your image into would be:

    • Launcher icons always go into mipmap folder.
    • Images, which are often scaled up (or extremely scaled down) and whose quality is critical for the app, go into mipmap folder as well.
    • All other images are usual drawables.

    Update:

    my question is why my app is not using the launcher icons I have placed in my mipmap folders. As stated in my original post, I have placed the *.png files in the mipmap folders. It is still showing the launcher icons that come with the template.

    For this, you can check document Adaptive icons.

    Android 8.0 (API level 26) introduces adaptive launcher icons, which can display a variety of shapes across different device models. For example, an adaptive launcher icon can display a circular shape on one OEM device, and display a squircle on another device. Each device OEM provides a mask, which the system then uses to render all adaptive icons with the same shape.

    Specially, pay attention to Creating adaptive icons in XML.

    To add an adaptive icon to an app using XML, begin by updating the android:icon attribute in your app manifest to specify a drawable resource. You can also define an icon drawable resource using the android:roundIcon attribute. You must only use the android:roundIcon attribute if you require a different icon asset for circular masks, if for example the branding of your logo relies on a circular shape. The following code snippet illustrates both of these attributes:

    <application  
        …  
        android:icon="@mipmap/ic_launcher"  
        android:roundIcon="@mipmap/ic_launcher_round"  
        …>  
    </application>  
    

    So , you can change android:icon and android:roundIcon to your image.

    As a test, when I only changed android:icon, there is no change for my app on my phone, but if I also changed android:roundIcon, my app's icon could change accordingly.

    Update 2:

    If the targetSdkVersion in your APP is below 26, then you can do without the APP icon adaptation. Android 8.0 will still be backward compatible. But if you specify targetSdkVersion to 26 or higher, Android will assume that your APP is ready for 8.0, including the application icon.

    If you specify targetSdkVersion to 26, but do not use the Android 8.0 app icon adaptation, the icon will look ugly.

    So, you need to add adaptive launcher icons for your app.

    For this, you can check document :Designing Adaptive Icons .

    For more details, you can check: https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive#creating_adaptive_icons_in_xml .

    Best Regards,

    Jessie Zhang

    ---
    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Nathan Sokalski 4,126 Reputation points
    2021-07-03T16:17:47.623+00:00

    Thank you for confirming that. I think it is a stupid thing to allow OEMs (or anybody else) to do, since most individuals do not have a logo (even if they have a common personal profile picture, that is for their profile, not their apps). I also think that a circle vs a rounded rectangle (almost square) can have a very extreme effect on how well a logo represents some apps (although for the lucky ones it might be almost irrelevant). But I guess there is no point in individuals arguing with someone like Google when they have an opinion... But thank you again for confirming the information.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.