Most people won’t bother searching for a product they’ve seen in an ad – especially if this ad simply directs them to a website’s home page. How can you quickly show your customers what they want to see? How can you accelerate purchases and win your users’ loyalty? The answer is deep links.

How to Implement Deep Links and Android App Links in an M-commerce App


1. Why Deep Links?
2. How Deep Links Work
3. Deep Links vs Android App Links
4. How to Implement Deep Linking in Android
5. Final Thoughts


Most people won’t bother searching for a product they’ve seen in an ad – especially if this ad simply directs them to a website’s home page.

How can you quickly show your customers what they want to see? How can you accelerate purchases and win your users’ loyalty? The answer is deep links.

Why Deep Links?

A deep link directs the user to a particular place in a mobile website or application. For example, if you advertise a product you can direct customers right to the product page.

Deep linking is one way to increase conversions while promoting your IT products. It erases barriers and allows users to find what they need quickly. This is especially important in mobile apps.

When you send emails, push notifications, or messages with information about discounts or promotional campaigns, you can’t just make the application load the landing screen. Promotional campaigns provide unique offers in a certain category, and you need to make sure that your customers don’t have to search in your application to find the products you’re promoting. This is when deep links become really useful.

The main problem they solve is friction in the UX. Maybe this won’t be a issue if your mobile store features just three products, but if there are hundreds, a user won’t even try to find an exact item. Deep links, on the other hand, help to improve UX and therefore customer loyalty.

How Deep Links Work

If you use an Android phone, you’ve probably seen “Open with…” menus.

These menus appear when you’re trying to open an address that’s connected to one of your installed apps. If you already have an application installed, you’ll be directed to a specific page within it. Otherwise, the page will open in a web browser.

These menus pop up only once assuming you choose to always open such links with a given application, but this can be changed in Android device settings.

If you want to offer your users all the benefits of a mobile app such as better performance and push notifications, you can offer them to install your app when they open a deep link. This will happen if you don’t set a custom URL. In this case, the user will be directed to the app store and the page in the application will be opened right after it is installed.

In recent years, it’s become apparent that even this technology is no longer enough to fully meet users’ needs, however. The modern trend is multi-platform linking, which allows you to build universal links. This means that a single URL can point to multiple destinations simultaneously, and the local client can determine what app to use to open this link.

Android uses Android App Links to do this, while iOS uses Universal Links.

However, Android App Links work only for Android 6.0 and above. For older versions of Android beginning with 4.2, you’ll need to use Android URL schemes.

Deep Links vs Android App Links

Before we talk about implementation, let’s determine the difference between and Android App Links and deep ones.

Deep links don’t give specific directions to an app. If there are several apps that are able to open a URL, a dialog will appear to ask the user what app to use to open the link.

Android App Links (AALs) (AALs) on Android 6.0 and later, on the other hand, don’t need to ask a user anything. It’s possible to assign a link to a specific application. If a user doesn’t want the assigned app to open such URLs, this can be changed in the device settings.

There are certain benefits of AALs:

  • Security: AALs use URLs that are connected with your domain. This means that no other app will be able to open your links. You’ll need to verify domain ownership to use this technology through one of the Android association methods.
  • Perfect UX: if users don’t have an app installed yet, they’ll simply be directed to a page on your website.

How to Implement Deep Linking in Android

You can start from Google’s documentation, but there are some tricks in my tutorial that can save your time. In this tutorial, we’ll be using DeepLinkDispatch, an Android SDK for deep linking.

Step 1

First, you should find the AndroidManifest file and add an intent-filter with action.VIEW, category.DEFAULT, and category.BROWSABLE children:

    	<intent-filter android:autoVerify="true">
        	<action android:name="android.intent.action.VIEW"/>
        	<category android:name="android.intent.category.DEFAULT"/>
        	<category android:name="android.intent.category.BROWSABLE"/>
        	<data android:host="" android:scheme="http"/>

The elements and attributes of an intent filter are the following:

1. <action>
The action tag defines what happens in the app when a link is clicked; it specifies the action view.

2. <category>
The category tag defines the properties of a deep link. The BROWSABLE category allows it to be opened in a web browser. The DEFAULT category allows a it to be opened without specifying the app name.

3. <data>
The data tag specifies a URI as a deep link; it must include the android:scheme attribute.

Here’s manifest sample code in XML format, which calculates GPA.

Step 2

Now you need to add code in your app to show a particular resource when a deep link is clicked. Call the getData() and getAction() methods to retrieve the data and action associated with the incoming intent.

You can call these methods at any time during the life cycle of your activity, but it’s best to add these operations in OnCreate() or OnStart().

The following code retrieves data from an intent:

public void onCreate (Bundle savedInstanceState ) {
   super.onCreate ( savedInstanceState );
   setContentView ( R.layout.main );
   //get intent
   Intent intent = getIntent ();
   //get action
   String action = intent.getAction ();
   //get data
   Uri data = intent.getData ();

Add your code below getData. Your deep link should take the user directly to the activity without prompts or logins.

Also, here’s a simple yet noteworthy library from Airbnb for handling deeplinks.

Step 3

You’ll still have to add thousands of lines of XML code to your manifest file, and this library won’t save you from Google’s ugly pattern realization. But it will make it much easier to handle links in your app.

So instead of adding an intent-filter child to your Activity tag, you should define a new NoDisplay activity named .DeepLinkActivity. This activity is provided by the following library:

    	<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:host="" android:scheme="http"/>

And here’s how it handles deep links:

public class MainActivity extends Activity {
  @Override protected void onCreate(Bundle savedInstanceState) {
    Intent intent = getIntent();
	if (intent.getBooleanExtra(DeepLink.IS_DEEP_LINK, false)) {
      Bundle parameters = intent.getExtras();
      String idString = parameters.getString("id");
      // Do something with the ID...

If you’re interested in implementing Android App Links, you’ll need to verify ownership of your domain. You can check out how to do that here.

Final Thoughts

Our developers have found DeepLinkDispatch to be really useful. It’s an annotation-based SDK that helps to make deep linking easier to handle on Android.

DeepLinkDispatch allows you to use annotations to for handling and makes information processing easy and fast. With this SDK, you won’t need a million lines of code to process routes around your application.

If you have any questions about implementing deep or Android App links, don’t hesitate to contact Mobindustry. We’ll gladly share our experience implementing deep linking in Android and iOS apps.

Request Callback

Request Callback