Android Instant Apps

Android Instant Apps kicks off Live Testing

Google previewed Android Instant Apps at Google I/O last year as a new way to run Android apps without requiring installation. Since then, Google has been working with a small number of developers to refine the user and developer experiences.

Today, a few of these Instant Apps will be available to Android users for the first time in a limited test, including apps from BuzzFeed, Wish, Periscope, and Viki. By collecting user feedback and iterating on the product, Google will be able to expand the experience to more apps and more users.

Android Instant Apps enables Android apps to run instantly, without requiring installation. Instant Apps lets users experience what you love about apps—fast and beautiful user interfaces, high performance, and great capabilities—with just a tap.

To develop an instant app, developers need to update their existing Android app to take advantage of Instant Apps functionality and then modularize the app so part of it can be downloaded and run on-the-fly. You’ll use the same Android APIs and Android Studio project.

Android Instant Apps functionality is an upgrade to your existing Android app, not a new, separate app. It’s the same Android APIs, the same project, the same source code. The effort involved varies depending on how your app is currently structured. You modularize your app, and Google Play downloads only the parts that are needed, on the fly.

Developers can also start getting your app ready for Instant Apps by working through this list of steps. Many of these are considered best practices for Android apps generally.

1. Remove any unneeded bulk from your app

Get rid of any unknown/unused permissions, unused components, unneeded third-party dependencies, and libraries. Removing these items can dramatically reduce the size of your app and improve performance significantly.

2. Support URL-based navigation

Android Instant Apps automatically handles web links using the App Links feature introduced in Android 6.0. As such, App Links are required in order to support URL-based navigation of Android Instant Apps.

Android Instant Apps uses URLs for all navigation. When a user taps a link to your instant app, they go to a specific activity within your app. If the link fails or the user taps the link on an unsupported device, the browser opens and shows your website. Also, an activity cannot launch another activity directly within an instant app; rather, it must request the URL address that corresponds to that activity.

3. Refactor your app, if necessary

Android instant apps need to be structured into URL-addressable modules that are under 4MB in size. For apps that are larger than 4MB, developers would need to refactor the app into smaller modules that can be downloaded and run independently in response to URL navigation. Developers are free to choose what to include in each module, but our recommendation is to isolate distinct user flows into different modules. This gives a fast and responsive experience within a flow and additional modules are downloaded only when the user switches flows. For example, when building a retail experience, you might separate your app into four modules: browse, search, item detail, and checkout to allow the user to download modules as needed throughout the purchase flow.

4. Implement runtime permissions from Android 6.0

Android Instant Apps use runtime permissions, introduced in Android 6.0. The Android Instant Apps framework ensures that these features work correctly on earlier versions of Android as well. As such, please make sure your app is targeting Android 6.0+ and implement runtime permissions.

5. Implement Smart Lock for Passwords if your app authenticates users

For instant apps that include login, developers must integrate Smart Lock for Passwords. This allows users to quickly and securely sign in by using the credentials they have saved, as well as for users to remain signed in across app visits.

6. Identify unsupported features

User expectations may vary for apps that are installed vs. apps accessed via URL, so certain functionality available to installed apps is not available to instant apps. Developers using any of the below functionality would need to refactor their app to move unsupported features to a separate library module that can be included only in their installed app.

Instant apps cannot:

  • Run on the device without users being aware. Foreground services are available. Instant apps can only be started through activities that support App Links, so services, content providers or broadcast receivers won’t be able to start your app. Push notifications are currently not supported in instant apps.
  • Access external storage on the device. However, instant apps can temporarily use internal storage private to the app.
  • Discover or interact directly with the list of installed apps on the device (e.g. via explicit intents).
  • Receive broadcasts from the system or other installed apps, or use GCM. In the future, instant apps may support a limited set of broadcasts while the app is running.
  • Access device identifiers that (1) persist longer than the instant app and (2) are not resettable by the user (e.g. Settings Secure Android ID (SSAID), Build Serial, Mac Addresses, IMEI, IMSI). NOTE: developers will have access to the Advertising ID.
  • Change device settings (e.g. change the user’s wallpaper).

The full SDK will be available to developers in the coming months.

On the user side, you won’t really notice much — and that’s really the idea. When following links that would normally send you either to a simplified mobile page or directly to the Play Store for an app, you may now see this simplified Android app interface instead — that’s when you know you’re using an Instant App.