Mipmap folder doesn’t make sense?

Purpose of mipmap and drawable folders in an Android project.

When you upload the App Bundle or the APK to the Google playstore, the user is able to download the optimised APK.

Assuming the user has XHDPI device. Then the playstore is going to remove all the resource drawable folders except the drawable-xhdpi variant along with common drawable folder. So all other drawable folders such as drawable-mdpi, drawable-hpdi, drawable-xxhdpi, and so on will be removed.

But here is a twist.

The playstore doesn’t remove mipmap variants. Even though the user device is XHDPI, his APK will get all the mipmap variants. But why?

This is because each Android device in their home screen tries to use high-quality launcher icons for optimum clarity. A device with XHDPI screen might use the high-quality icon from either drawable-xxhdpi or drawable-xxxhdpi folder, which is definitely unknown to the playstore at the time user downloads the app. This is the reason why the mipmap variants remain untouched during APK optimisation.

Since the mipmap folders remain unaffected, therefore launcher icons are store within the mipmap folders so that the Android system in the user’s device can draw the required launcher icon on his home screen.

Here is a detailed video on “Why we use mipmap instead of the drawable folder” to store launcher icons.

--

--

--

Tech enthusiast, love coding, and love to make videos on my YouTube channel Smartherd.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Flutter with Firebase

Managing the UI State by using a Finite State Machine and MVI architecture

Google Android Developer Interview

Battery Status: Android

Bottom Sheets — Material Components for Android

Persistent bottom sheets expand

Handling backpressue in Rxjava

How to set error message in edittext android

Expandable TextView with LayoutTransition. Part 1

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sriyank Siddhartha

Sriyank Siddhartha

Tech enthusiast, love coding, and love to make videos on my YouTube channel Smartherd.

More from Medium

Designing for Diversity: How to improve diversity in design

Wingspan — The Best Board Game Ever

How to check the global status of an object

Top MR Interactions Design Concepts