I want to know what is the use Build Bundle Option in Android studio 3.2
Here is a image
What is App Bundle?
An Android App Bundle is a new upload format that includes all your app’s compiled code and resources, but defers APK generation and signing to Google Play.
Google Play’s new app serving model, called Dynamic Delivery, then uses your app bundle to generate and serve optimized APKs for each user’s device configuration, so they download only the code and resources they need to run your app. You no longer have to build, sign, and manage multiple APKs to support different devices, and users get smaller, more optimized downloads
Uses of App Bundle
Dynamic Delivery :
Dynamic Delivery is Google Play's new app serving model, and it uses your app bundle to generate and serve optimized APKs for each user's device configuration, so they download only the code and resources they need to run your app. For example, user won't need other languages strings if he have set English as his default language.
Dynamic feature modules :
Dynamic feature modules allow you to separate certain features and resources from the base module of your app and include them in your app bundle. Through Dynamic Delivery, users can later download and install those components on demand after they've already installed the base APK of your app. You can use Play Core Library you can download these modules when requested .
On the left: a simple app that includes a base APK (B) and some configuration APKs (C). On the right: a more complex app that includes two dynamic feature APKs (D) and corresponding configuration APKs (C) for download on demand.
No need for having multiple APKs :
The dynamic delivery takes care of the split apk . A fundamental component of Dynamic Delivery is the split APK mechanism available on Android 5.0 (API level 21) and higher. With split APKs Google Play can break up a large app into smaller, discrete packages that are installed on a user's device as required.
optimizing the APK content are based on the following:
Locale
Screen density
CPU architecture
More info can be found here
Smaller Apk size :
As app are broke in smaller parts , that means when user downloads you app it will be of smaller size for him . On average, apps published with app bundles are 20% smaller in size.
Testing App Bundles
After you build your Android App Bundle, you should test how Google Play uses it to generate APKs and how those APKs behave when deployed to a device. There are two ways you should consider testing your app bundle:
Locally using the bundletool command line tool
Through Google Play by uploading your bundle to the Play Console and using the new internal test track.
Sources
Android official documentation
Codelabs
Medium blog post
An Android App Bundle is a file (with the .aab file extension) that you upload to Google Play to support its new app serving model, called Dynamic Delivery. Each bundle includes the compiled code and resources for all of your app's modules and supported device configurations.
Shortly its a new upload format that includes your code and resources but defers APK generation and signing to Google Play.
link
Studio will generate .aab file that will be uploaded on playstore and it will create many different versions of app based on chip architecture, screen size and locale.
Newer customized apk for different devices have smaller download size.
ref
Actually this will help you to reduce the downloadable size from play store
since while user install it will gave only required part of that apk for higher resolution mobile only XXXHDMI folder will download not XXHDMI and XHDMI
Related
I know that google play generated an optimized APK for a given App Bundle (aab).
But if one publishes the old format (APK), does google play modify the apk to make it smaller? Does the user download the whole apk on every update?
Yes.
Note from August next year, you will only have to download aab.
Google Play does not make APKs smaller as it isn't designed for that. AAB are the new upload format and Google Play generates APKs from AAB depending on the device (screen density, abi, language etc) as well as bringing many new features such as dynamic modules.
Google Play uses your app bundle to generate and serve optimized APKs for each device configuration, so only the code and resources that are needed for a specific device are downloaded to run your app. You no longer have to build, sign, and manage multiple APKs to optimize support for different devices, and users get smaller, more-optimized downloads.
More information: https://developer.android.com/platform/technology/app-bundle
I am clicking review on my APK, but I am getting this message:
Unoptimized APK Warning:
This APK results in unused code and resources being sent to users.
Your app could be smaller if you used the Android App Bundle. By not
optimizing your app for device configurations, your app is larger to
download and install on users' devices than it needs to be. Larger
apps see lower install success rates and take up storage on users'
devices.
Resolution:
Use the Android App Bundle to automatically optimize for device
configurations, or manage it yourself with multiple APKs.
However I can not move forward. My app is only 5.19MB, so how do I fix? I am using Phonegbap to build my apps.
This is because you're generating an Apk instead of App bundle
You can read more about App bundle here: https://developer.android.com/guide/app-bundle/
Just finish other sections for the app: "Content Rating", "App Content" and "Pricing & distribution". Publishing function should be available after that.
Warnings
Check these warnings before starting the rollout of this release. Addressing the warnings on this page will ensure your existing users are able to upgrade to the latest version of your app.
How i can fix that in android studio?
Unoptimized APK
Warning:
This APK results in unused code and resources being sent to users. Your app could be smaller if you used the Android App Bundle. By not optimizing your app for device configurations, your app is larger to download and install on users' devices than it needs to be. Larger apps see lower install success rates and take up storage on users' devices.
Resolution:
Use the Android App Bundle to automatically optimize for device configurations, or manage it yourself with multiple APKs.
You don't need to do anything with that. Its telling you that you have assets for multiple screen sizes being sent to users, and that they'll only use one of them. You can make your apk smaller by building and uploading multiple apks, but unless you have a very large apk its probably not worth the time/effort.
If you're not able to upload it at all, you're missing another error somewhere else.
The code is practically the same, I just added one class, is it because when the Bundle is installed in a device just a part of it is going to go to that device and its size is going to be lower?
From the docs
Google Play’s Dynamic Delivery uses your Android App Bundle to build
and serve APKs that are optimized for each device configuration. This
results in a smaller app download for end-users by removing unused
code and resources needed for other devices.
So basically apk will be build using Dynamic delivery which will combine only necessary resources and will ensure that the build installed on particular design is optimized. There is no mention that bundle size is smaller, but it ensures that download size for end user will be less.
Also this a good article to refer to.
Mentionig some key points mentioned in it
Step 1: You write all your code for your app in an IDE such as Android Studio or a games engine such as Unity as you normally would.
Step 2: Now, when you’re ready to test or release the app, you build it as an Android App Bundle, Android’s new app publishing
format. You still sign the app so that Google Play can verify it’s
from you.
Step 3: If you haven’t already, you opt in to app signing by Google Play. If you’re releasing a new app, you can do this in a one-click
process when you upload your app. When you opt in, Play designates
the first key you used to sign your app bundle as the upload key.
This is just for security identification purposes and, if you ever
lose it, you can contact Google to verify your identity and reset
it. For existing apps, you need to visit the app signing page in
the Play Console and securely transfer your app signing key to
Google Play. Why do you need to do this? Continue to step 4 to find
out.
Step 4: When you upload your app bundle to Google Play, Play processes it and generates split APKs signed with the app signing
key for every possible device configuration and language that you
support. Split APKs are an Android platform feature introduced in
Android L. As long as each split APK is signed with the same key,
the Android platform will treat them as one app. You can think of a
split APK as ‘part’ of an APK: to run the app, the device treats
all the parts as a single app.
Step 5: When a user installs the app, Play delivers the base split APK (all the code that’s common for every device), the language
split APKs (for the languages the user speaks), and the device
configuration split APKs (for the device’s screen size and the CPU
architecture). This means the device gets just what it needs without
wasted space. For updates to be accepted by the device, every
release’s split APKs must be signed with the same app signing key as
the original app install.
I developed an app that works on most phones starting API 16, the problem is that in LG G2 it only works on API 20 and higher..
Is there any way I can do this separation in the google play store?
Thanks,
Dani
This is possible using multiple APK support.
Multiple APK support is a feature on Google Play that allows you to
publish different APKs for your application that are each targeted to
different device configurations. Each APK is a complete and
independent version of your application, but they share the same
application listing on Google Play and must share the same package
name and be signed with the same release key. This feature is useful
for cases in which your application cannot reach all desired devices
with a single APK.
You can support different platform versions with each APK, which will allow you to use API 20 and API 16 as you request.
However, keep in mind this recommendation from Google:
Using a single APK to support different configurations is always the
best practice, because it makes the path for application updates
simple and clear for users (and also makes your life simpler by
avoiding development and publishing complexity).
You will need to configure your APK's platform API levels in your AndroidManifest.xml and upload the published APK in Advanced Mode in the Google Play Developer Console. This means setting up multiple AndroidManifests, configuring them to included different 'uses-sdk' elements and uploading multiple APK.
All of the filters that are valid for Multiple APK publishing are listed in this Google-provided guide:
http://developer.android.com/google/play/filters.html
While this is possible, I would advise you to avoid it if you can because maintaining it is not fun or easy.