Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 287
Smeet Avatar asked Nov 20 '18 08:11

Smeet


People also ask

Which is better Android App Bundle or APK?

APK is the Android packaging format that users can install directly on their devices, whereas AAB is a publishing format that developers provide to Google. With the introduction of AAB, developers no longer have to worry about developing multiple APKs for different devices.

What is the difference between APK and APK bundle?

What's the difference between AABs and APKs? App bundles are only for publishing and cannot be installed on Android devices. The Android package (APK) is Android's installable, executable format for apps. App bundles must be processed by a distributor into APKs so that they can be installed on devices.

How does app bundle work Android?

Stay organized with collections Save and categorize content based on your preferences. Important: From August 2021, new apps are required to publish with the Android App Bundle on Google Play. New apps larger than 150 MB are now supported by either Play Feature Delivery or Play Asset Delivery.

Is Android App Bundle mandatory?

Android App Bundle requirement for new apps and gamesNew apps and games must use Play Asset Delivery or Play Feature Delivery to deliver assets or features that exceed a download size of 150MB. Private enterprise apps are not subject to this requirement.


1 Answers

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):

  1. 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.

  2. 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.

like image 68
Pierre Avatar answered Oct 19 '22 07:10

Pierre