How to deploy Android Instant Apps: Web apps take on native apps

With Android Instant Apps, developers can now code web apps that look and feel like the Android app-equivalent, while only loading a minimum set of functionality when the web app is called up. The result is a high-performing app that is easily discoverable, making the choice between developing web apps vs. native apps easier.

My team has looked extensively into Android Instant Apps, and we've found a lot to be excited about. I want to share that with you here, including: 

  • What devices and versions of Android support Instant Apps
  • How to update existing apps to support Instant Apps
  • The security changes you will need to make
  • Best practices to build instant apps
  • How to deploy instant apps to consumer and enterprise app stores

Here are five key considerations for getting started with Android Instant Apps.

Get 161-Page BookThe Mobile Analytics Playbook: A practical guide to better testing

What's new about Android Instant Apps?

Instant Apps brings a significant change to what it means to build a website or an app. Today, the two models are separate: On one hand, you have the web model of a responsive website, and on the other, you have the app model as defined by Apple’s App Store (sorry, Google; Apple has earned the kudos here).

The reason for the two models is that the web is universal, but limited by the power of JavaScript, versus the vibrant performance of apps. Instant Apps breaks the pattern. On an Android- or Chrome OS-powered device, a URL can now be used to load on demand only the minimum amount of code needed to build an Android app instead of a website. The benefit is that the web, in appearance, is now as powerful as any Android app.

What devices support Android Instant Apps?

Google places its teams in the future to build solutions for that world. It comes as no surprise then that Google began work on Android Instant Apps with the release of Android 4.1. By the time Android 2.2 arrived, it was clear that Google’s Android was destined to be the most popular operating system on the planet. The challenge for Google is Android fragmentation. How do you build apps when there are dozens of variations? The solution: Don’t focus on the OS; concentrate instead on the experience the OS is providing.

The second issue Google had to face was support of its operating system. Again, as early as Android 2.2, it was clear that Android device manufacturers often built smartphones to meet the minimum specifications to power a device. This creates a culture that forces customers to upgrade frequently.

The problem is that customers are moving away from upgrading their devices every 12 months. According to Google’s data, the most popular version of Android is Kitkat (Version 4.4), followed by Lollipop and Jelly Bean (versions 5.0 and 4.1). For this reason, Android Instant Apps runs on any Android device powered by Android 4.1 and newer. That’s 96 percent of all Android devices.

How to update existing apps to support Instant Apps

Android Instant Apps works with Google Play Services, existing Android code, and Android APIs. For a seasoned developer, it will take about a day to update an existing medium-size project to support Android Instant Apps functionality.

There are some caveats. Android Instant Apps works for apps built using native code in Java or C++. But apps built with Cordova, PhoneGap, Titanium, GameSalad, and other “build once, deploy everywhere” tools will not work with Instant Apps. Google requires that you make Instant Apps with Android Studio.

To get started, sign up for the new code from Google at this address.

What security changes will you need to make?

One challenge for Android is the increased perception of inadequate security. On the surface, Android Instant Apps appears to perpetuate the problem with apps being installed ad-hoc. Fortunately, Google has been working on security in Instant Apps for many years. Google Play is central to the success of Instant Apps, and Google is dramatically improving the tools in Google Play to analyze new and existing apps for malicious code. Only apps published on the Google Play App Store will support Instant Apps.

This is big news for security. There are many independent Android app stores, most of which do not have security measures that come even close to those used by Google. By using Instant Apps you assure the source of the app (Google Play) and a prescribed level of security. That's one less problem you need to tackle.

5 steps for building instant apps

Google announced Instant Apps at its Google I/O 2016 conference. In conjunction with the announcement, Google stated that it may be a year before Instant Apps is fully functional. But nothing is stopping you from getting in early and working with the first APIs and frameworks. Here are some of the best practices you'll need for building and running Instant Apps:

  1. Build the app in Android Studio
  2. Regularly update the Instant Apps API (use the Dev Channel)
  3. Publish to Google Play App Store
  4. Test on multiple devices running Android 4.1 and later
  5. Report problems to Google

I also suggest that you chat with other developers in groups such as the Android Studio G+ group.

Deploying instant apps to consumer and enterprise app stores

The final stage for any app is deploying it to an app store. The fact that Android Instant Apps is tied to Google Play App Store is ideal for consumer apps, but it could potentially pose a problem for enterprise app stores. Until recently, the most efficient method for deploying enterprise Android apps was a custom Android app store.

Google introduced an alternative with Android for Work (A4W) which leverages a private channel in Google Play for publishing apps. A4W supports increased security for deploying apps across your company, and also provides an “instant install” offered by Instant Apps. This may mean, however, that many businesses will need to upgrade their Android deployment model to support A4W.

Get up to speed

With Android Instant Apps, Google is offering a great opportunity for all web and Android developers to create web apps that work and perform like their Android app equivalents. As a developer, you no longer have to choose between the reach of the web versus the rich functionality of a native Android app. While Instant Apps won't be fully functional until next year, now is the time to get up to speed and learn best practices so that your apps —and your users — can reap the benefits as soon as possible. 

Get 161-Page BookThe Mobile Analytics Playbook: A practical guide to better testing
Topics: MobileSecurity