The Talent500 Blog
Introductions to deep linking in Android 1

Introductions to deep linking in Android

In android development, deep linking is an important feature. As people are using applications for a personalized experience, it becomes necessary that mobile development brings personalization to the process.

Google introduced deep linking for android development as a way for applications to gather data inside the database as a URL link. If you are an android developer, it’s essential to understand how deep linking and android functions. This article explores the implementation of deep links in an android app.

What is a deep Link?

A deep Link is a URL generated by the application based on the user’s past behavior. The app opens with a specific activity or screen when the user clicks on the deep link. We can customize the deep Link URL to send a message to applications with predefined parameters. For example, using a deep link in WhatsApp, we can create a URL that sends a specific message to a phone number when the link is correct. Deep links are useful in providing direct access to specific screens or tasks of an application with a URL link.

How to create deep links? 

A practical implementation of deep link can be a simple application that displays a particular message when the URL is clicked. Here is a video of the working example:

To create a new project in Android Project, refer to this article on How to Create New Project in Android Studio. The code can be implemented in both Java and Kotlin programming languages for Android.

Step 1: Create an activity_main.xml file 

The first step is to create an activity_main.xml for your android project. You can use Java or Kotlin programming language for this example.

The activity_main.xml code will be like this:

<?xml version=”1.0″ encoding=”utf-8″?>









    <!– text view for displaying welcome message –>







        android:text=”Welcome to “




        android:textSize=”30sp” />

    <!– text view for displaying the organization

        name from the link which we have generated –>






        android:text=”Organization Name”





        android:textStyle=”bold” />


Step 2: Create an AndroidManifest.xml file

The next step is to create an AndroidManifest.xml file because we will add a deep link to the MainActivity file. Pay attention to the comments to understand what the code does: 

<?xml version=”1.0″ encoding=”utf-8″?>

<manifest xmlns:android=””










<activity android:name=”.MainActivity”>


<action android:name=”android.intent.action.MAIN” />


<category android:name=”android.intent.category.LAUNCHER” />



<!– as we want to open main activity from our link so we are specifying

only in main activity or we can specify that in different activity as well –>

<!– on below line we are adding intent filter to our MainActivity –>


<!– below line is to set the action to our intent to view –>

<action android:name=”android.intent.action.VIEW” />

<!– on below line we are adding a default category to our intent –>

<category android:name=”android.intent.category.DEFAULT” />

<!– on below line we are adding a category to make our app browsable –>

<category android:name=”android.intent.category.BROWSABLE” />

<!– on below line we are specifying the host name and

the scheme type from which we will be calling our app –>



android:scheme=”https” />



<!– below is the same filter as above just the scheme is changed to http –>

<!– so we can open our app with the url starting with https and http as well –>


<action android:name=”android.intent.action.VIEW” />

<category android:name=”android.intent.category.DEFAULT” />

<category android:name=”android.intent.category.BROWSABLE” />



android:scheme=”http” />





Step 3: Configure the MainActivity File

Finally, we will make changes to the MainActivity File in Java or Kotlin language as follows: 


import android.os.Bundle;

import android.widget.TextView;


import java.util.List;


public class MainActivity extends AppCompatActivity {


// creating a variable for our text view

private TextView messageTV;

private Uri uri;



protected void onCreate(Bundle savedInstanceState) {




// initializing our variable

messageTV = findViewById(;

// getting the data from our intent in our uri.

uri = getIntent().getData();


// checking if the uri is null or not.

if (uri != null) {

// if the uri is not null then we are getting

// the path segments and storing it in list.

List<String> parameters = uri.getPathSegments();

// after that we are extracting string

// from that parameters.

String param = parameters.get(parameters.size() – 1);

// on below line we are setting that string

// to our text view which we got as params.





The output 

As you run the app, you will be greeted by a screen for the organization’s name. Now close the application and click on the link “” A pop-up will appear, asking you to select the application. Inside the pop-up, select the application you just created. The message “GeeksForGeeks” will be displayed in place of the Organization name.

When to use deep links?

Deep links produce a seamless user journey that increases the likelihood of app installation. Users are directed to the installation page with a single click. These links are also useful in creating app content that makes incentivizing easier. Companies use deep links to increase conversion rates and retention rates.


In android development, deep links play an important role in improving user experience. We hope this guide on deep linking and android will help you anticipate the importance of the concept for improving your mobile development skills.

Talent 500 is a distributed team-building platform for Fortune 500 companies and fast-growing start-ups. Sign up here to learn more.

Manik Sharma

Manik Sharma

Manik Sharma specializes primarily in UI or Software Development using Javascript libraries like React and Redux along with HTML, CSS, and other libraries like Bootstrap, Node.js, Express.js, MongoDB. He loves to talk business and think of cool startup ideas. Definitely, an entrepreneur in making. He is equally interested in discussing innovative ideas that can make a huge difference in someone's life.

Add comment