Table of contents

Created

Requirements

Prerequisite knowledge

Basic familiarity of building Android application with AIR and using intent filters in the application.

User level

{adcConfig::_[skillLevel]}

Introduction

Beginning with AIR 24, the developers can now use Android's App Links feature to associate an AIR application with their web domain. Android's App Link is a way to turn developer’s website links into app links. With Android 6.0 (API Level 23), a new mechanism has been introduced for opening up the application directly. This mechanism is similar to adding Universal Links on iOS, where if a normal HTTP/HTTPS link is clicked and the corresponding application is installed, users can be redirected to the application directly — just by tapping the link of the website.

For example, consider a website http://www.example.in. If the developer properly configures this website for App Links and its corresponding application is installed on a mobile device, the app opens up immediately when the link is clicked. Additionally, the developers also need to create intent filers in the application manifest for website URI.

Once set up, when a user clicks on a link of developer’s website from another application or webpage, this link opens up in the corresponding application immediately via the intent, provided the application is already installed — completely bypassing the browser. If the user doesn’t have the application installed, the link opens the website in a web browser.

How AIR supports App Links

To get an application ready for App Links, follow the steps listed below:

1. Create Intent Filter for URI in app.xml

To enable an app to handle links, use intent filters in app.xml under the manifest tag to
declare the URI patterns that the application handles.

The following example shows an intent filter that can handle links
to https://www.example.in and http://www.example.in.

For App Link verification, the developers need to declare an 'association with apps' by publishing a JSON file on web servers. When users install the app, App Link verification checks this file on the web server to make sure that the website allows application to open URLs on its behalf.

Only developer can create and upload this file, so the association of developer’s website with the app is secure.

Create a JSON format file with below content named as 'assetlinks.json'.