I have added a new Image Asset to my build, tested it on virtual and physical devices, then pushed as a Beta to the Play Store. Everything is checking out on my end, but one of my testers is saying that the app icon is not showing up!? He's using a Google Pixel phone running Android 8.0. Does anyone know what could be causing this?
Android Oreo requires few versions of your icon, and you have to create adaptive icon
https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive.html
1. Select app folder from your project
2. Select File → New → Image Asset
3. On "Foreground Layer" choose the path of your image and resize in order to get the proper aspect for the icon
4. On “Background Layer" use the provided background color
5. Click on Finish and mipmap icons are created in different sizes
In your manifest file do the following changes
<application
...
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
...>
</application>
Source: How to create adaptive icons for android
Related
I have a samsung phone and a Motorolla phone. On my Samsung phone my propgrammed and set custom app icon is used and displayed. On my Motorolla this is not the case. Instead the default android logo remains. Any clue why this is?
follow these steps :
1) add app icon in mipmap folder with different sizes
2) In Menifest.xml set android:icon="#mipmap/app_icon" and android:roundIcon="#mipmap/app_icon"
^ Make sure you have added android:roundIcon="#mipmap/ic_launcher_round" in manifest file
I have some test png image and I want to use it as launch icon.
I used Image Asset in Android Studio for that.
This files were created.
Manifest:
<application
android:allowBackup="false"
android:icon="#mipmap/icon_famous_p"
android:label="#string/app_name"
android:roundIcon="#mipmap/icon_famous_p_round"
android:supportsRtl="true"
android:theme="#style/Theme2">
I tested this on several devices (api from 17 t0 28) and everything was ok, I got icon. I have already tested the app on this devices before. The same story with virtual devices - everything is ok.
But on my own phone, xiaomi mi mix 2s (api 28) I can't get my icon. I get some small icon instead.
I tried to del app before install, to reboot the phone and so on but the problem didn't solve
Update. I found out that icon doesn't change on api > 26- if you load first image, it doesn't change after changing res in Android Studio
I will set a square app icon for my Android App made with Android Studio.
I set my own app icon with File -> New -> Vector Asset
This creates a normal and a round app icon.
If I copy and rename (ic_launcher_round.png) the quadratic app icon and install it for example on OnePlus Launcher i get the round icon, too.
My Logo is square, so it is really ugly to see it round.
How I can force a quadratic app icon? Is this possible?
If I set only android:icon="#mipmap/ic_launcher" instead of this and android:roundIcon="#mipmap/ic_launcher_round" in my Manifest.xml nothing change.
Your app's icon will be rounded when a launcher decides to make it rounded.
The "launcher" is just another app, like yours, but it is not your app - it is separated completely from it, and you can't normally influence any process that is separated from your app's process, OS will forbid that.
Only sometimes you would be able to do something like that by utilizing some form of Inter Process Communication (IPC) offered by your OS, assuming of course that the process you want to communicate with is also 'willing to talk' with you [utilizes the same form of IPC to allow other process to change some of its behaviors].
Also the purpose of the Android Studio's wizard you used was to help you generate ready-to-use drawable files and it was just to save your time on making these drawables all by yourself in some image editor.
Any drawable set inside XML manifest file for being your app's round icon will be rounded a t the end and that is no matter how it actually looks. I don't think you can expect any currently available major launcher application to display some apps' icons as round and some as square. It would significantly harm its user experience.
I'm afraid you will have to adapt to this situation and make your square app's logo a little bit smaller and leave some empty space around it to allow end user's launcher app to draw a circle around this logo.
Here you can find official recommendations for designing Android apps' launcher icons: https://material.io/guidelines/style/icons.html#icons-icons-for-android and here you can read about the most current approach in a subject of Android apps' icons: Adaptive ones. Any other type of icon can be treated as 'legacy' and used only for compatability reasons when targeting APIs below 26.
Edit:
In the comments section OP mentioned some apps that do currently have square icons in their newest versions and that turned out to actually be a small UX design flaw of its developers.
Just as an example, I've downloaded Bytecoin app OP mentioned, and this is how it looks like on my phone, Android 7.0:
The red object in the corner has ben cut off. I think we can assume that every other app on the Google Play that displays there with square logo [which looks good in their store pages because Google Play allows square logos] will look bad when installed on phones with modern versions of launchers, especially api >=26.
If your target SDK is 26 and android device version is 8, the app icon will be round.
One of the ways to achieve this is (Not sure if it is the right/best way to do it)
In AndroidManifest.xml I had to set
android:targetSdkVersion=“20”
<uses-sdk android:minSdkVersion=“16" android:targetSdkVersion=“20” />
android:roundIcon=“#mipmap/ic_launcher_round”
<application android:hardwareAccelerated=“true” android:icon=“#mipmap/ic_launcher” android:label=“#string/app_name” android:roundIcon=“#mipmap/ic_launcher_round” android:supportsRtl=“true”>
Ensure the ic_launcher_round images are Squared one.
I used the android studio to generate adaptive and legacy icons…
I deleted the ic_launcher_round images generated by the android studio.
I copied ic_launcher images(Generally the Square icons) to ic_launcher_round.
Now my ic_launcher_round is Squared icons.
(ic_launcher_round.png, ic_launcher.png, icon.png) all of them are the same images
After making this changes, rebuild the app. Now you should see Square icon when you install the app.
Since Android 8.0 (Oreo)
The new way of designing app icons for Android now is described there :
Adaptive icons
Android 8.0 (API level 26) introduces adaptive launcher icons, which can display a variety of shapes across different device models.
When using adaptative icons, launcher icons have 2 layers : foreground and background (see Creating adaptive icons in XML).
The shape (round, square...) can vary depending of the system / launcher settings.
Before Android 8.0
Legacy icons can be generated this way : Create a legacy launcher icon
I upload an app in play store.Now i got a comment that it shows default android icon in some devices (galaxy s4,nexus 5 )instead of app icon.I placed app icon in drawable-ldpi,drawable-mdpi,drawable-hdpi,drawable-xhpdi and drawable-tvdpi. Default android icon is present outside resource folder as ic_launcher-web. While testing it showed the app icon itself in galaxy s4.But when it downloaded from play store it is showing default app icon.What I should do to correct this problem?
Since app icon has very little impact on the system performance, I recommend that you to put a 256*256 icon in the default /res/drawable/ resource folder.
I had the same problem and the issue was with app icon resource.
I had defined an adaptive icon in a mipmap-anydpi-v26 folder. Both for standard and round resources. For other devices I had standard launcher icon in respective mipmap-<density-qualifier>. And in AndroidManifest.xml
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
The default icon was displayed on Devices that had lower version of Android than 26 but launcher supported roundIcon. Cause this resource was not existing for this devices. Add ic_launcher_roundresource for all densities solved the problem
You need to put the app icon in drawable-xxhdpi and drawable-xxxhdpi too.
Reference: http://developer.android.com/design/style/iconography.html
I have an Android app that I am currently developing. I have created icons (.png) and placed them in the /res/drawable-hdpi (and ldpi & mdpi) folders. In my manifest I have
<application android:icon="#+drawable/icon" android:label="#string/app_name">
my icons are all named icon.png.
I have compiled the source and when I run it on the emulator, the icon shows up in the desktop launcher. But when I copy the apk to my actual phone, the desktop launcher shows the default package icon rather than my custom icon. Although, funny enough when I am actually installing the app, the package manager does show the icon. But once it is installed, the icon does not show.
How do I make my application icon show up as the launcher icon?
Skip
remove the "+" in "#+drawable/icon"
I had the same problem, and I never used the "+" in the manifest.
Rebooting&wiping emulator or restarting Eclipse did not work for me.
I simply solved renaming all the icon.png files to something different (e.g. iconq.png).
I just had the same issue. I renamed my icon to launch_icon and restarted Eclipse. Not sure which one did the trick but it worked after that
It's possible to have different icons set for different components (ie Activity and Service). Make sure that you have the icon only defined for the application element, and nothing else. This will guarantee that all components will have a the same icon, the one defined in the application.
For some reason it was the ROM I had on my phone (it was a gingerbread MIUI ROM). I put a new ROM on my phone today and it works fine. Strange.
I had a similar problem. I am running a custom rom (Cyanogen mod 7), and my solution was to simply reboot my device. After that, the icon appeared.
Make sure that the Intent of your Launcher Activity is named MAIN
i.e,
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Moreover, add the icon to your Drawable folders and then refer it in the application block of Manifest.
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
In my case, I was testing in a Nexus 5X device with the Android Nougat and the icon was correct, but in the emulator on the same android version but with the Pixel Launcher, the default icon were shown.
I saw that in my case I forgot to replace the android:roundIcon property in the manifest to use the new one.
Round Icon Resources
Apps can now define circular launcher icons, which are used on devices that support them. When a launcher requests an app icon, the framework returns either android:icon or android:roundIcon, depending on the device build configuration. Because of this, apps should make sure to define both android:icon and android:roundIcon resources when responding to launcher intents. You can use Image Asset Studio to design round icons.
You should make sure to test your app on devices that support the new
circular icons, to see how your circular app icons look and how they
are displayed. One way to test your resources is to run the Android
emulator and use a Google APIs Emulator System targeting API level 25.
You can also test your icons by installing your app on a Google Pixel
device.
For more information about designing app launcher icons, see the
Material Design guidelines.
https://developer.android.com/about/versions/nougat/android-7.1.html#circular-icons