Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android App Bundle: from start to deployment

Julien Salvi
September 05, 2022

Android App Bundle: from start to deployment

This publication format has been around for a while now and is required for the new apps on the Play Store since August 2021.

This session will cover all the steps to migrate your existing project in order to build and release a brand new AAB file to the Play Store. You will see the advantages and drawbacks of App Bundle. How you can easily configure your project, handle testing tracks and update your CI/CD (CircleCI, Bitrise) to deploy your optimized app with Fastlane. We will go even further with taking a look at Play Feature & Assets Delivery.

Julien Salvi

September 05, 2022
Tweet

More Decks by Julien Salvi

Other Decks in Programming

Transcript

  1. Table of contents What’s Android App Bundle? Ship small, move

    fast Moving to Android App Bundle From Gradle build scripts to CI/CD Handling testing with AAB How to manage your testing sessions with AAB with bundletool Advanced AAB features A glimpse at Asset Delivery and Dynamic Features
  2. Android App Bundle Optimizing the APK size and deliver what

    the user only needs are the key features of Android App Bundle. Let’s see what AAB brings to us and for our users 🚀
  3. Android App Bundle What does it bring? • New publication

    format introduced by Google ⛓ • Produce a aab file instead of apk 🧰 • Allow to distribute smaller apk to users 📦 • Enable Play Feature and Assets Delivery 🚀 • Have a positive impact 🌱
  4. Android App Bundle What about the .aab? Key advantages: 💥

    Decrease APK size by 21 MB (-59%) for common devices 💥 Less download time for our users 💥 We save (a little bit) the planet
  5. Do I need to migrate to AAB right now? Well...

    • It’s not mandatory for old apps but it has many benefits! • If you’re distributing your app outside the Play Store, maybe no • Yes! And actually you must go for the AAB format... • Since August 2021, AAB is mandatory for new apps in Play Store For the new apps...
  6. Journey to App Bundle Update codebase Update CI/CD Deploy on

    Play Store Play Feature/ Asset Delivery ✨
  7. CI/CD with CircleCI and fastlane ✍ Installing fastlane is very

    easy on CircleCI 🚀 Run the playstore fastlane lane (wait for the next slide :) CircleCI setup:
  8. CI/CD with CircleCI and fastlane ✍ Sign the .aab file

    with your production key 🚀 Release to the Play Store with fastlane ⚠ Make sure to enable App Signing on the Play Console Fastlane setup:
  9. Handling testing with App Bundle How to test .aab files?

    • You cannot directly install .aab files on a device • Use the test track on the Play Console • Use Firebase App Distribution • Use bundletool for converting .aab file into .apk files Convert .aab to .apk files
  10. What kind of features with App Bundle? Asset Delivery: •

    Great for games mainly: allow downloading large assets after install • You can configure when and how the asset download happens • Deliver features to your users so they have always optimized apps • Full modularization of your application Dynamic Features:
  11. Asset Delivery Delivery mode • install-time: the assets are delivered

    when the app is installed. No download needed. Served as split APKs. • fast-follow: assets are downloaded automatically when app is installed. • on-demand: assets are downloaded when the app is running.
  12. Asset Delivery Download size limits ℹ APK limit size: 100

    MB, AAB limit size 150 MB on the Play Store • Each fast-follow and on-demand asset pack has a limit of 512 MB. • install-time asset packs cannot exceed 1 GB. • All asset packs cannot exceed 2 GB on the device. • No more than 50 asset packs per App Bundle.
  13. Asset Delivery Configuration • Make sure to target version 4.0.0+

    for your Android Gradle plugin my-project/ ├── app/ ├── asset-pack-name/ │ ├── src/ │ │ └── main/ │ │ └── assets/ │ │ └── <your assets> │ └── build.gradle ├── build.gradle └── settings.gradle
  14. Dynamic Features Overview • Allow to give only the needed

    features to your users • Delivery modes: install-time, conditional or on-demand • Make sure to notify your users about the download states • Do not forget to uninstall unused modules 👀 Let’s have a quick look how we can setup a dynamic feature
  15. Android App Bundle • Reducing APK file size • Use

    Dynamic Features and Assets Delivery • Have a positive impact • AAB files cannot be directly installed on devices • You are stuck with the Play Store ecosystem The Good The Bad
  16. Make good use of App Bundle! 📦 Do you have

    any questions? @JulienSalvi Thanks Julien Salvi Lead Android Engineer @ Aircall