BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News First Android Instant Apps Are Available

First Android Instant Apps Are Available

Google has made available a number of applications as Instant Apps in order to gather user feedback. The SDK is to be made available to all later this year.

Google has recently announced that several Android applications are ready as Instant Apps. Although “thousands of developers” have expressed their interest in building such applications, Google has named only four of them - BuzzFeed, Periscope, Viki, Wish - as being ready for the general public to test in order to gather feedback and improve the framework. They intend to open up the SDK and make the framework available to all later this year.

Instant Apps is Google’s new approach to deep linking. Instead of having a web application and navigating to a certain page of it based on its URL, one can take a regular Android application, split it up in modules, and a certain module is loaded and run when the user chooses a related action in another application, without having to install the application. Google introduced this functionality last year at Google I/O. InfoQ has covered the subject at that time, providing information on how Instant Apps work, what the benefits are, what some of the conditions to be met by developers are, and how to publish one. We won’t mention those details here.

Google has published guidance on how to make an application ready to run as an Instant App. The main points are:

  1. Remove any unneeded bulk from your app.
  2. Support URL-based navigation. This is based on App Links introduced in Android 6.0. Navigation to the target activity and between activities is done via URL links associated to those activities.
  3. Refactor the code where necessary. The modules must be less than 4MB in size.
  4. Use the runtime permissions existent in Android 6+.
  5. Implement Smart Lock for Passwords if the app authenticates users.
  6. Move unsupported features to a separate library that is loaded with the installed application, but not available as Instant App. Some of the unsupported ways to load Instant Apps are: background services, content providers, broadcast receivers, and push notifications. Instant Apps cannot access the external storage, discover or interact with apps on the device via intents, receive broadcasts, access GCM, access some device identifiers, change settings. Most of this functionality is forbidden to Instant Apps to protect the user.

Although Instant Apps depend on the runtime permissions introduced with Android 6.0, they can run on earlier versions of Android starting with 4.1+ (API 16+), but they require Play Services.

Rate this Article

Adoption
Style

BT