Setting Up Google Play Instant for Android (Mini Apps)
Google Play Instant enables users to launch part of an application without installation—directly from a web browser, Google Search, or Play Store with a "Try Now" button. Use cases include game demos, new user onboarding, and content preview via deep link without requiring prior installation.
Technically, an instant app is the same APK with strict size and functionality constraints. It's not a separate application—it's a subset of an existing one.
Technical Constraints
Size: An instant experience cannot exceed 15 MB. This is the primary limitation. For applications with numerous assets, fonts, and dependencies, this presents a significant challenge. Android App Bundle with dynamic modules (dynamic-feature) enables you to include only the required functionality in the instant experience.
API limitations: Instant apps operate in a sandbox. Unavailable APIs include READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE, access to contacts, SMS, and persistent notifications. Some hardware APIs are restricted. Bluetooth, camera, and microphone are available with user permission, just like in regular applications.
INSTANT_APPS_ACCESS permission must be added to the instant module's manifest.
Storage: SharedPreferences within instant scope are temporary and cleared. To preserve data between instant and installed versions, use InstantApps.getPackageManagerCompat() with the Cookie API—a small buffer (~16 KB) for transmitting state during installation.
Project Structure with Instant App
The application is divided into modules through Android App Bundle:
-
app— base module (always installed) -
feature_instant— module withdist:instant="true", included in instant experience - remaining
feature_*— dynamic modules, downloaded on demand
In feature_instant/AndroidManifest.xml:
<dist:module dist:instant="true">
<dist:delivery>
<dist:install-time />
</dist:delivery>
</dist:module>
install-time for instant means "include in instant experience," not "install with the base module."
The instant module code is launched via an intent with a deep link—the same URL used for App Links. When users install the application, the instant experience seamlessly transitions to the installed version.
Common Implementation Obstacles
15 MB size limit. APK analysis with apkanalyzer reveals what consumes space: typically unoptimized drawables (webp instead of png), fonts (only necessary weights via downloadable fonts), and large libraries. ProGuard/R8 with isMinifyEnabled = true and isShrinkResources = true are mandatory. Sometimes dependencies must be replaced—for example, using the Static Maps API with ImageView instead of the full Google Maps SDK.
Navigation. Instant apps are launched via URL. If navigation is built on internal IDs rather than deep links, refactoring is required. NavDeepLinkBuilder in Navigation Component simplifies this but requires each instant experience screen to have a corresponding URL.
Testing. You can launch an instant app directly from Android Studio using a configuration with Launch: Instant App URL. On the device, enable "Google Play Instant" in Developer Options. Without real device testing, sandbox restrictions are difficult to verify.
Cookie API for state transfer. If a user completes onboarding in the instant version and then installs the app, without the Cookie API that progress is lost. Implementation: store data in a cookie via InstantApps.setInstantAppCookie() in the instant version; on first launch of the installed version, retrieve it via InstantApps.getInstantAppCookie().
Setting up Google Play Instant for an existing application takes 3–5 days, assuming the app already uses a multi-module structure. For a monolithic project, prior modularization adds time. Cost is calculated individually.







