Mipmap folder doesn’t make sense?
Why launcher icons in Android are stored within the mipmap folder. Why not in the drawable folder?
When you upload the App Bundle or the APK to the Google playstore, the user is able to download the optimised APK.
What do I mean by 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.