Android Instant Apps

android instant apps

   Google Instant apps are the apps that can be used without being installed on the device. They are loaded from the web and can be used to perform a specific task, such as viewing a product or making a payment. This concept was introduced in 2016 and 2017 to the public, offering people a subset of an existing app. These are basically designed to save users space on their device.

How does an instant app work ?

   Instant apps work by using a technology called Google Play Instant. Google Play Instant allows developers to split their app into smaller modules, called chunks. When a user clicks on a link to an instant app, Google Play only downloads the chunks that are needed to run the app. This means that instant apps can be loaded and used much faster than traditional apps. Within an app, specific features are associated with App Links, which serve as links to launch those features. When a user clicks on the link or triggers an intent launch, Google Play matches the URL with the corresponding feature module. It then downloads only the necessary feature APK files and initiates the entry point activity specified in the APK manifest file.

High Level Architecture

adroid instant app architectureThe overall structure of an instant app can be described as follows:

Base Feature Module: This module constitutes the essential functionality of the app, including the main activity and the user interface layout.

Feature Modules: These modules encompass additional features for the app, such as a shopping cart or a profile page, enhancing its capabilities.

Instant App Module: This module packages the instant app and enables its distribution to users.

    Both the base feature module and the feature modules are compiled into separate APKs. The instant app module then combines these APKs into a single bundle, which users can download and execute. The instant app module contains a manifest file that outlines the necessary permissions required for the instant app's operation. Additionally, it specifies the URL through which users can access the instant app.

    When a user clicks on a link to an instant app, the Google Play Store initiates the download of the instant app bundle to the user's device. Subsequently, the instant app module is launched by the Google Play Store to commence app execution. The instant app module selectively downloads the required chunks from the Google Play servers as needed. These downloads occur in the background, ensuring that users can begin using the app without significant wait times. Once all the necessary chunks have been downloaded, the instant app becomes fully functional, enabling users to interact with it just like any other app.

How to enable?

To activate instant apps on your Android device, follow these steps:

  • Access the Settings app on your device.
  • Locate and tap on the Google option.
  • Within the Google settings, find and select Instant Apps.
  • Toggle the Upgrade web links setting to the On position.
android instant app settings

    Once you have enabled instant apps, you'll notice a "Try the app" button when you visit the Play Store website for an app that supports instant apps. Clicking this button will launch the app in a sandbox environment, providing you with the app experience without the need for installation.

How to create?

To create an instant app, you can follow these general steps:

Modularize your app:This means dividing your existing Android app into separate modules. The core functionality of your app should be included in the base feature module, and any additional features can be placed in separate feature modules. Each module should have clear boundaries and dependencies.

Configure Gradle:This involves updating your app's build.gradle file to configure the instant app build. You need to set the feature modules and base feature module dependencies appropriately, and ensure that you have the necessary dependencies and plugins for building instant apps.

Define feature modules: Create separate feature modules for each additional feature you want to include in your instant app. Define the activities, layouts, and resources specific to each feature module. Configure dependencies between the modules if required.

Update manifests: Review and update the AndroidManifest.xml files for the base feature module and feature modules. Ensure that they specify the necessary permissions, activities, intent filters, and other app components required for proper functionality.

Test and debug: Build and test your instant app on emulators and physical devices. Verify that the individual feature modules can be loaded and executed correctly. Debug any issues that arise during testing and make necessary adjustments.

Create instant app module: Create an instant app module, which serves as the entry point for the instant app. This module will package the base feature module and other feature modules into a single instant app bundle.

Configure instant app manifest: Create a manifest file specific to the instant app module. Define the URLs that will be used to access the instant app and set the required permissions and intents.

Build instant app bundle: Generate the instant app bundle, which includes the base feature module and feature modules. This bundle will be published and distributed to users.

Publish to Google Play: Upload the instant app bundle to the Google Play Console as an instant app release. Follow the necessary steps to configure the release, including setting targeting options and defining rollout strategies.

Why should we consider Instant Apps

On-Demand Loading: When a user encounters an instant app, either through a web link, a deep link, or another app, the necessary parts of the instant app are dynamically loaded from the web. Instant apps are modularized, meaning they are divided into smaller components or modules. Only the modules required for the initial user interaction are loaded, reducing the data and time needed to start the app.

Lightweight Execution: Instant apps prioritize speed and efficiency. They are optimized to deliver a lightweight and streamlined experience, focusing on the core functionalities relevant to the user's immediate needs. This approach helps reduce the app's footprint, making it faster to load and operate.

Temporary App Installation: Although instant apps don't require a full installation, they are temporarily installed on the user's device for the duration of the user session. Once the user closes the instant app or moves away from it, the temporary files associated with the app are automatically removed from the device, freeing up storage space.

Seamless User Experience: Instant apps aim to provide a seamless transition from the initial interaction to the app experience. When a user accesses an instant app, it appears and behaves like a regular installed app, with a user interface similar to a native app. The user can interact with the instant app, navigate through screens, and perform various actions as they would in a traditional app.

App Promotion and Conversion: Instant apps can also serve as a promotional tool for full-featured apps. By providing users with a glimpse of the app's capabilities through the instant app experience, developers can entice users to install the complete app on their device. Instant apps can include prompts and calls to action to convert users into full app installations.

Limitations

While instant apps offer numerous benefits, it's important to consider their limitations:

Limited Functionality: Instant apps provide access to a subset of an app's code and resources, resulting in restricted functionality compared to full apps.

No Background Execution: Instant apps cannot run tasks in the background, preventing them from performing activities like sending notifications or syncing data while the user is not actively using them.

Restricted Access to Device Features: Instant apps lack access to certain device features, such as the camera, microphone, or location. They have limited permissions compared to full apps, ensuring user privacy and security.

Device Compatibility: Instant apps require devices running Android 5.0 (Lollipop) or higher with the Google Play Store app installed. They may not be available on all devices, potentially limiting their reach.

Conclusion

    Overall, instant apps offer a variety of benefits for both developers and users. They can be used to improve user engagement, drive app adoption, and deliver seamless experiences in various scenarios. For more info, refer Android Instant App and Getting started: Android Instant App


Comments (0)
empty comments

Nothing here yet

Nervo Tech Logo

Explore a treasure of technical blog posts on Android, Big Data, Cloud, Python, and More!

© 2025 Nervo Tech. All Rights reserved.