This post has been republished via RSS; it originally appeared at: Microsoft Developer Blogs - Feed.
The Android App Bundle (.aab) is a new upload format that includes all of your app's compiled code and resources, but defers APK generation and signing to Google Play at install time. Google Play does this through a new app serving model called Dynamic Delivery, this uses your app bundle to generate and serve an optimized APK for each user's unique device configuration, so they download only the code and resources that are needed to run the application. This eliminates the need to have to build, sign, and manage multiple APKs based on their ABI, locale, screen size, and more. Additionally, you can use dynamic feature modules to define what feature modules and resources that users first download when they install your application. Using Android App Bundles increases the app size limit to 150MB without having to use those pesky APK expansion files. One of the many benefits you get when using Android App Bundles.Size Savings
As your application size increases, so does the complexity of your application. Your users may run into problems such as:- Slower downloads
- Decreased installation rates
- Increased uninstall rates
- Non-supported device APKs
- Faster downloads
- Increased installation rates
- Decreased uninstall rates
- Serve users functionality and configurations on demand
- Simplify your build and release management by removing the need to publish multiple APKs
Getting Started
To build app bundles and support Dynamic Delivery, you can follow these steps:- Download Visual Studio 16.4 or higher on Windows or Visual Studio for Mac 8.4 or higher on Mac.
- Prepare your application for
Release
- Build an Android App Bundle using Visual Studio. If you're not using an IDE, you can instead build an app bundle from the command line.
- Enroll into app signing by Google Play
- Publish your app bundle to Google Play.
Build and deploy Android App Bundles
App bundles differ from APKs as they cannot be deployed directly to a device. Rather, it's a format that is intended to be uploaded with all of your compiled code and resources. After you upload your signed app bundle, Google Play will have everything it needs to build and sign your application's APKs and serve them to your users using Dynamic Delivery. If you're using Visual Studio, you can build your project as a signed app bundle in just a few clicks. If you're not using the IDE, you can instead build an app bundle from the command line. To enable support for Android App Bundles, you'll need to opt-in to thebundle
value of the Android Package Format property within your Android options. As you do this, ensure you change your project to a Release
configuration as app bundles are intended for release packages only. To do this you can follow these steps:
- Right click your project, and select
Properties
. - Navigate to
Android Options
. - Change your configuration to
Release.
- Change the Android Package Format to
bundle
.
Archive
. This will generate an app bundle for your application.
Test your app bundle
After you've created your Android App Bundle, you can test how Google Play will generate the respective APKs when deployed to a device. To test your app bundle, you may try to:- Test your Android App Bundle locally using bundletool which generates APKs from your app bundle and deploy them to a connected device.
- Share your application with a URL. You can share your app as a Google Play Store link with your trusted testers.
- Set up a custom delivery. You can customize your delivery options based on who you want to test your app.