Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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.

    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.

    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

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question . Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers .