Does Google Play include all mipmap densities when downloading app? - android

I've tried searching around a bit, without any luck. I've developed some apps that uses a lots of images (Mostly 200*200 pixels in size). I'd like to support different screen sizes by adding different sizes of the images, but since that would increase the apk with many MegaBytes, I need to know if a device downloads all the mipmap-densities, or just the one meant for its own screen size?

It contains all densities currently. Perhaps this will change in the future. You as a developer can split your apk into multiple apks for different densities and upload them as split-apk to google-play.

Related

What if all resources are placed in one resolution for android app bundle

As we all know that Google launch new feature of distributing android apk using android-app-bundle that has so many advantages.
So my question is, how my app will behave if I place all the images/resources in single folder like drawable-xxxhdpi. e.g. Lets say I have one application that uses 5 images. Instead of taking different sizes for different resolutions, I place all the images in single folder (drawable-xxxhdpi) assuming lets android handle it based on device resolution.
As we know that android-app-bundle generates different different apks based on resolutions, languages and so on.
So in that case what will happen to my app ? How APKs will be generated for different resolutions (Android itself re-scales images and generates bundle ?) What will happen to app, will it crash or working properly for smaller resolution devices ?
I know this is non- coding question but its technical question. I tried to search for this but not able to find exact answer of it.
I may help to others as well.
Your app will work the same as before: Play serves to a given device the files that the Android platform would have loaded if it had served the APK with all the files.
In other words, if an mdpi device would have loaded the resource res/drawable-xxxhdpi/icon.png, then that's what Play will serve to that device.
--
Also, slightly unrelated to your question, but note that there are some downsides to providing resources only in xxxhdpi (regardless of whether you publish an APK or an Android AppBundle):
The Android platform will have to rescale these images at runtime on lower resolution devices, thus taking some CPU time and making your app slightly slower.
Your app is bigger than it could be on lower resolution devices. If you provided also the same resource in mdpi, it would obviously be smaller, and that's what Play would serve to an mdpi device, thus making your app smaller for those devices.
Resource not found exception will be triggered in devices with lower resolutions
Good and very helpful question, I think your application will work fine on xxxhdpi devices but those devices which are mdpi or hdpi will face layout issues. I don't think so there would be any other issue than this.

Too large APK due to multiple densities and screens sizes?

Google suggests to create for each image 4 different versions - one for each density (ldpi, mdpi, hdpi, xhdpi). Sometimes you might even want to create others, based on the screen size (small, normal, large, xlarge).
This causes a weird situation where most of the app's images will never be used by the app, right?
How come Google doesn't create multiple APKs on their website, to target the best APK to the end user's device, so that 100% of the resources will be targeted on the device's specs? Or there is already such a thing?
Yes there is a support for multiple APK. Please refer here.
To address your need precisly you can certain filters in your manifest file i.e. <supports-screens> or <compatible-screens>

Does Android only install device size's resources?

For the same images, I store several copies of different sizes in my Android project (ldpi, mdpi, hdpi). Now if a user installs my application on lets say a mdpi device, does it only copy the mdpi files to the device, and not use too much storage space? (maybe takes something from hdpi if missing)
If so, will the Android market show the size for 'your' device only, or the size of the full apk?
As blackbelt notes, all resources in an APK will be installed on the device. However, if you really need to restrict this, you can use the Market's multiple APK functionality to deliver tailored APKs to different devices. Google recommends that you use a single APK if possible, but the multiple APK route might make sense if your configuration-specific resources are particularly large.

Possible to upload/publish application separately for different densities?

I have 'drawable' folders in 'res' for the different densities (low, medium, high, extra high) which I'm considering. This is bloating my app to 20MB+ whereas if I could build/upload my application separately for each density it would be less than 10MB. Anyone know if this is possible and how?
Yes, you can have multiple versions of your application on the Market that are filtered based on screen density. Google Market filters allow you to accomplish this. Google does not recommend this though, because managing multiple .apks can be a hassle. Here's the dev docs on Multiple APK Support.

Publishing multiple versions of one app on Google Market

I have an Android app that I would like to display high quality images with. However there are many different screen sizes and ratios. I know there are filters to show apps in Market only for devices with small/medium/large screens.
If I put images of both sizes in 1 app it will double the size of the app, right?
Is it a good practice to make multiple versions for different screen sizes?
I would like to make 1 app in 3 versions for such devices:
medium screen mdpi
medium screen hdpi + large screen mdpi
large (tablets)
If it's possible to do it how can I specify them in manifests? Or is it somewhere in market?
Android has a built-in mechanism for having resources designed for different screen sizes and pixel densities. It's called resource directory qualifiers, and you can read all about it here.
For example, for small screen sizes, you could create a specific layout file and place it in the res/layout-small directory. For a larger screen, you could create a layout file with the same name and place it in the res/layout-large (or res/layout-xlarge) directory.
For pixel density, you could create a small version of your image resources and place them in the res/drawable-ldpi directory (lower pixel densities). And for higher pixel densities, you could create alternate versions and place them in the res/drawable-hdpi directory.
I'd encourage you to read the page on Supporting Multiple Screens, and let Android help you out with its built-in mechanisms. Creating three separate copies of your app is harder for you to maintain, and it confuses potential users (most of whom probably neither know nor care about "pixel densities"). What's to stop them from downloading the wrong version of your app, and getting a lousy experience because of it?
No one seems to be addressing the file size issue you're really asking about, so I'll try.
You should package your high quality images as a set of separate downloads, one for each type of device you plan to support. This makes your base app small, and ensures the end user's disk space is only filled by images it needs.
I've not done this myself, but hopefully the idea will send you on the right search path. I imagine you design the separate download as either resources on your own server, or another set of apps in the market (i.e. "MyApp Image Pack HDPI", "... MDPI", etc.).
As Donut mentions above android has excellent documentation for this here, here, here and here.
Note that all Manifest file changes and how to create one binary that will support different screen sizes, different densities AND different SDK's are at android website. But it requires careful planning and testing to do so.
The best way is to have ALL device configurations (listed here, including the Samsung Galaxy Tab simulater (large screen, hdpi) available here) in your development environment and test your app on them.
You have to create different .apk for each version and define this in your application's manifest file.use this link
http://developer.android.com/guide/practices/screens-distribution.html

Categories

Resources