tezvyn:

Play Asset Delivery: Beyond the APK Size Limit

AI-drafted, machine-checkedSource: developer.android.comadvanced
Play Asset Delivery: Beyond the APK Size Limit

Think of Play Asset Delivery as Google Play managing a CDN for your game's large assets, letting you bypass the initial download size limit. It delivers textures and levels at install, right after, or on-demand. The footgun is assuming delivery succeeds.

WHY IT EXISTS: The Google Play Store limits the size of an app's initial download. Games and other large apps often have gigabytes of assets like high-resolution textures and levels, which won't fit. Play Asset Delivery was created to solve this by letting Google host and deliver these large assets separately from the main app bundle.

THE MENTAL MODEL: Think of Play Asset Delivery as a specialized Content Delivery Network (CDN) for your app's assets, fully managed by Google Play. Instead of bundling everything into one giant file or managing your own servers, you package assets into "asset packs." You then tell Google how and when to deliver them to the user's device, keeping your initial app download small and fast.

HOW IT WORKS: You integrate it using the Android App Bundle (.aab) format. You group assets into asset packs and specify one of three delivery modes. First, install-time packs are delivered with the initial app install and are available immediately at launch. Second, fast-follow packs start downloading automatically as soon as the app is installed, letting the user open the app while assets arrive in the background. Third, on-demand packs are only downloaded when the app explicitly requests them, perfect for content like new game levels.

WHEN TO USE IT: Use this for any app with assets that exceed the initial download size limit (currently 200MB). It is the standard, modern approach for Android games with large amounts of content. It replaces the older, more complex system of APK Expansion Files (.obb files).

WHEN NOT TO USE IT: Don't use it for small assets that can easily fit within your base app bundle. The overhead of creating packs and managing delivery states is unnecessary for small amounts of data. It is also not a general-purpose file hosting service; assets are read-only and managed through the Play Asset Delivery API.

ONE CANONICAL EXAMPLE: A large open-world game might ship with only the starting area in an install-time pack. As the player completes the tutorial, the game can use fast-follow to download the next major region. When the player approaches a specific dungeon, the app can trigger an on-demand download for that dungeon's unique assets. The biggest footgun here is failing to check if the on-demand download succeeded before trying to load the dungeon, which would cause a crash.

Read the original → developer.android.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.