Usage of mipmap launcher icons before Android 4.2?
Asked Answered
H

3

21

I'm using Android Asset Studio to generate my launcher icon and I've seen that the output is now creating mipmap folders instead of drawable folders.

Since mipmap support has been added since Android 4.2 and my application is targeting ICS 4.0.3 (API 15). Is it safe to use them ? and then don't have any ic_launcher icon in drawables folders ?

update I confirm it's working fine. You can only use mipmap folders for Application icon

Holdup answered 21/1, 2015 at 13:28 Comment(2)
purely experience guess here... put on mimap-v17 and keep the drawables for older devices.Jabin
yeah... the thing is I'd prefer to avoid having my ic_launcher defined at 10 different places (mdpi+hdpi+xhdpi+xxhdpi+xxxhdpi * 2). I tested with Genymotion 4.1.1 and things seems fine but would prefer confirm this on a real device :))Holdup
R
11

Mipmap folder support was added in Android SDK 11 or Honeycomb. This means that you can use the Mipmap folder from Android version 3.0 and above, including version 4.2. This is most official documentation I can find about this topic.

Repentance answered 28/4, 2015 at 16:32 Comment(3)
See developer.android.com/reference/android/R.mipmap.html added in API level 11.Schnell
what happens on devices <SDK 11?Decease
@強大な Ther folder won't exist to the OS. The OS will basically never look for anything within the folder.Repentance
R
9

I was not able to find official documentation that stated this will work on Android versions older than 4.2. However these mipmap resource folders started appearing in apk files that shipped with Honeycomb, so anything newer than that will have support it would be safe to assume.

I have tested an app using only mipmaps for the launcher icon on physical devices and had no issues on versions 4.0.3 and higher. I have not tested on Honeycomb, Gingerbread and older.

For more information about mipmaps in Android Studio, take a look at this site:

https://androidbycode.wordpress.com/2015/02/14/goodbye-launcher-drawables-hello-mipmaps/

Rejoice answered 15/2, 2015 at 0:3 Comment(0)
S
2

I have tried mipmap folder for launcher icon on a real device API level 8 and it works there too.

Samy answered 22/6, 2016 at 0:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.