Create App Links for Instant Apps (original) (raw)

An Android Instant App is a small version of your app that runs without installation. Instead of installing an APK, users launch your app simply by clicking a URL. As such, all instant apps need to be accessible via a URL declared using Android App Links. This page explains how to use Android App Links for your Android Instant Apps.

First, here's a summary of what you should already understand about app links.

So, Android App Links are simply HTTP deep links that your website is verified to own so that the user doesn't need to choose which app to open. For a more specific description, see differences between deep links and app links.

In both cases, however, the user must already have your app installed. If the user clicks one of your web site's links and they don't have your app installed (and no other app handles that URL intent), the URL is opened in a web browser. So, creating an Instant App solves this part—it allows users to open your app by simply clicking a URL, even if they don't have your app installed.

When end users perform a Google search for your app, Google Search displays a URL with the "Instant" badge.

If you've already followed the guides toCreate Deep Links to App ContentandVerify Android App Links, then you've already done most of the work necessary to make app links work with your instant app. There are just a couple extra rules when using app links for instant apps:

<intent-filter>  
    <action android:name="android.intent.action.VIEW" />  
    <category android:name="android.intent.category.DEFAULT" />  
    <category android:name="android.intent.category.BROWSABLE" />  
    <data android:scheme="http" android:host="www.example.com" />  
    <data android:scheme="https" />  
</intent-filter>  

Notice that you don't need to include the host in the second <data>element because, within each <intent-filter> element, all combinations of each <data> attribute are considered valid (so this intent filter _does_resolve https://www.example.com).