What shape should Unity app icons be and which icons are necessary? - android

I am making a app for iOS and Android and have a couple questions about the icons. First I know I should make Android icons a square because the launcher cuts it into shape. Does iOS do the same or do I need to have the icon in the proper shape? If I have to add the shape on my own what would the border radius's for each size be? Second do I need to use the adaptive icons with 2 layers or will my app still work on those devices using the other icons?

For android the app icon size 512 is recommended
For iOS the app icon size 2048 is recommended
Unity is capable to generate other size what all are required.
You can use this online tool to generate all size app icon
https://makeappicon.com/
It will create shape for iOS too that is 180 radius for corner as iOS do not support alpha in app icon, for android you can use square or with alpha corner, both is ok.

Related

forcing square app icon

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

App icon size on Android 8.0 if targetSdkVersion >= 26

My app has a square icon. When targetSdkVersion < 26 the app icon is shown correctly on all devices. But with targetSdkVersion >= 26 the app icon is shown inside a white circle on Android 8.0 devices.
Is there a way to remove the white circle?
Per the Understanding Android Adaptive Icons blog post:
Indeed Google’s launcher will start placing icons of apps which target Android-O but do not supply an adaptive icon onto a background (scaling down their non-adaptive icon).
You must add an adaptive icon to your app once you target API 26. As adaptive icons change their outer shape based on what device they are running on, you cannot rely on your launcher icon always being a square.
The Designing Adaptive Icons blog post and Implementing Adaptive Icons blog post goes through more details on how you might take advantage of adaptive icon's separate background and foreground layers and how to implement an adaptive icon in your app. Android Studio also contains tooling to help via the New > Image Asset wizard as described in the Create app icons with Image Asset Studio article.

How not to use the adaptive icon feature for my app in Android?

I have 2 games that I created, both compiled for Android.
I run both games on an Oreo device, but for some reason one shows the original icon and one shows the icon inside a white rectangle.
I am trying to find out how Android decides whether to show the original icon or the icon inside the white border as part of the adaptive icons feature.
Target API version? icon with alpha channel?
Managed to figure out how this works, so posting here for others that encounter the same problem.
Android uses the targetSdkVersion to select if the adaptive icons feature is used. If the targetSdkVersion is 26 and above, it will add the white border around the icon, if 25 or lower is used, it will not.
I guess what Android is doing is treating the icon image as the foreground element of the adaptive icon and using white as the background element.
The real solution here should be to support adaptive icons of course, but as a quick solution, I just changed my targetSdkVersion to 25 for now.

Android notifications: have colors in small icon

Since Lollipop, notification small icons are "masks" (only the alpha channel is used).
I can verify this in the project I am working on: previously we had a colorful small icon, and it worked well on 4.4- devices but appeared as a white square on 5.0+ devices. (We updated the icon to fix this).
But now I see apps that manage to have colorful icons on 5.0+ devices!
How do they do it?
I realize I shouldn't even try to do that since the guidelines say the icon should be a white shape, but I am curious and would like to know how it is done.
I suspect this is related to the targetSdk, but didn't find any resources about it.

Which background color to use for Android Market's no-alpha "Hi Resolution Application Icon"

Now the Android Market requires developers to upload a:
Hi Resolution Application Icon, 512w x 512h, 24 bit PNG or JPEG (no alpha)
Problem: my application's icon is not a square, and because alpha is forbidden I will have to fill with some color like black. Or maybe white.
Which color should I choose?
According to the mail sent to Android developers, "the Android icon design guidelines located at http://developer.android.com/guide/practices/ui_guidelines/icon_design.html apply."
So you can use a transparent background.
Later edit: Roman Nurik (Android developer advocate # Google) said on Twitter that it's ok to use 32-bit PNG: http://twitter.com/romannurik/status/8375870980886528.

Categories

Resources