Deep linking on Android is the use of Android's intent system to open a link at a specific screen of an app, on every Android version, through an intent filter the app declares in its manifest (Android Developers, Create deep links, updated 1 December 2026).
The main benefit is that a tap in a browser, a notification, an email or an ad lands on the content the link names, not on the app's home screen. Android deep linking rests on three parts, in the order you build them. Intent filters tell the system which URLs an activity accepts. App Links turn your https URLs into verified links that open the app with no disambiguation dialog. Navigation setup takes the incoming URL to the right destination and builds a back stack that behaves as people expect. App Links need Android 6 (API level 23) on a device with Google services, and verification runs when the app is installed and takes at least 20 seconds (Android Developers, About deep links and Verify App Links).
This page covers the three kinds of deep link android supports, how the system picks an app, the intent filter and its path attributes, reading the link, verification, the Navigation component, testing with adb, and what happens to people who don't have the app. Every step applies to deep linking in android whether the app uses Views or Jetpack Compose.
What is a deep link on Android?
A deep link on Android is a URI that the system routes to an activity through an intent filter, so the app opens on a specific screen instead of its start screen. Android's Create deep links page names three types:
Custom deep links use a custom scheme, like
example://products/123. They work for links from sources you control, but nothing stops another app from registering the same scheme, which brings back the disambiguation dialog.Web links use the http and https schemes. On Android 12 and later, a web link that isn't verified opens in the browser by default.
App Links are verified web links, available since Android 6. Once the system confirms you own the domain, it opens links on that domain in your app and skips the dialog.
Smler links are https only, so on Android they work as App Links, never as custom scheme links. The type you pick decides how the system chooses which app opens a link.
How does Android choose the app that opens a link?
Android chooses the app that opens a link by triggering an intent and routing it in this order (Android Developers, Create deep links):
The user's default app for that URI, if one was set.
The only installed app whose intent filter matches the URI.
A disambiguation dialog that lists every matching app.
On Android 12 and later, a web link that is not a verified App Link opens in the browser instead of that dialog. A matching intent filter is the first thing every deep link needs.
How do you add an intent filter for a deep link?
You add an intent filter for a deep link inside the <activity> element of AndroidManifest.xml, with an action, two categories and the URL the activity accepts:
Add the
android.intent.action.VIEWaction, so the filter can be reached from Google Search, as Android's page puts it.Add the
BROWSABLEcategory, without which a link in a browser never resolves to your app.Add the
DEFAULTcategory, without which only an intent that names your component starts the activity.Add one or more
<data>elements withandroid:scheme,android:hostand a path attribute.Set
android:exported="true"on the activity, as Android's App Links sample does.
<activity
android:name=".ProductActivity"
android:exported="true">
<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="https"
android:host="www.example.com"
android:pathPrefix="/products" />
</intent-filter>
</activity>Watch one rule above all: the <data> elements inside one filter merge. Android's own example is a filter with https://www.example.com and app://open.my.app, which matches four URLs: those two plus app://www.example.com and https://open.my.app. Declare a separate filter for each unique scheme and host. The path attribute on the <data> element then decides which URLs on that host match.
Which path attributes match the link's URL?
Five path attributes match the link's URL, each against a different part of the path (Android Developers, <data> element):
| Attribute | What it matches | API level |
|---|---|---|
android:path | The complete path, like /products/42 | 1 |
android:pathPrefix | The start of the path, like /products | 1 |
android:pathPattern | The complete path with the wildcards . and .* | 1 |
android:pathSuffix | The end of the path | 31 |
android:pathAdvancedPattern | The complete path with regex-like sets, + and counts in braces | 31 |
Query and fragment matchers, like android:query and android:fragment, arrived in API level 35 inside a <uri-relative-filter-group>. Write the scheme and host in lowercase, since Android matches them case-sensitively. Android's reference advises pathPrefix over a pathPattern that ends in .*, which it calls safer and more efficient. Once a URL matches, the activity has to read it.
How do you read the link in the activity?
You read the link in the activity from the intent that started it, early in its lifecycle:
Call
intent?.dataandintent?.actioninonCreate().Handle a link that arrives while the activity is already running in
onNewIntent().Parse the path and query into the id of the content to show.
Show that content with no prompt, interstitial page or login, even to someone who never opened the app before.
Keep Back and Up behaving the way people expect after entering through a link.
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val action: String? = intent?.action
val data: Uri? = intent?.data
val productId = data?.lastPathSegment
}The rule on prompts and logins comes from Android's own best practices: the link "should take users directly to the content". On Android 12 and later, an https link that matches this filter still opens in the browser until it is verified, so verification comes next.
How do you verify a web link as an App Link?
You verify a web link as an App Link by asking the system to check a file on your domain that names your app:
Add
android:autoVerify="true"to the intent filter.Declare both
httpandhttpsin that filter and no other scheme, since Android says other schemes "will prevent verification".List each host the app should open.
Publish
assetlinks.jsonathttps://host/.well-known/assetlinks.jsonon every host.Install the app and wait at least 20 seconds for the check to finish.
Hosts trip up most setups. Android treats each subdomain as a separate host, so www.example.com and mobile.example.com each need their own file, while a wildcard host like *.example.com reads its file from example.com (Android Developers, Add Intent filters for App Links). The file itself holds your package name and the SHA-256 fingerprint of your signing certificate; its fields, fingerprints and hosting rules are in the guide to assetlinks.json. Android Studio's App Links Assistant and the Deep links page in Play Console both generate the file for you. How the verified link then behaves on each Android version is covered in Android App Links. With the link verified, the app still has to route it inside its own screens.
How does the Navigation component handle deep links?
The Navigation component handles deep links by matching an implicit deep link's URI, action or MIME type to a destination in the navigation graph, then building the back stack for it (Android Developers, Create a deep link for a destination). How you set it up depends on the graph type:
Programmatic graphs, as in Navigation Compose or the Kotlin DSL, declare the deep link on the destination with
navDeepLink<Profile>(basePath = "$uri/profile"). Navigation can't generate the manifest entries for a graph built at runtime, so add the matching<intent-filter>by hand.XML graphs declare a
<deepLink app:uri="..." />element on the destination and one<nav-graph android:value="@navigation/nav_graph" />element in the activity, which the build replaces with the generated intent filters.
composable<Profile>(
deepLinks = listOf(navDeepLink<Profile>(basePath = "https://www.example.com/profile"))
) { backStackEntry ->
ProfileScreen(id = backStackEntry.toRoute<Profile>().id)
}A placeholder like {id} in the path matches one or more characters, query arguments with a default value are optional, and extra query parameters don't stop a match. Keep the activity's launch mode at standard: Navigation then calls handleDeepLink() on its own. An activity launched singleTop doesn't get that call, so add navController.handleDeepLink(intent) to onNewIntent(). Links from inside the app, like notifications, work differently.
How do explicit deep links open a destination from a notification?
Explicit deep links open a destination from a notification through a PendingIntent, built with NavDeepLinkBuilder in an XML graph or TaskStackBuilder in a programmatic graph, and used for notifications and app widgets. An explicit link clears the task's back stack and adds the start destination of each nested graph, so Back leads up through the app as if the person entered from the launcher. An implicit link does the same only when its intent carries FLAG_ACTIVITY_NEW_TASK; without the flag it stays in the task of the app that fired it, and Back returns there. Both kinds are worth testing before release.
How do you test a deep link with adb?
You test a deep link with adb by sending the system the same view intent a tap would, on a device or an emulator:
Run
adb shell am start -W -a android.intent.action.VIEW -d "https://www.example.com/products/42" com.example.appto check that the filter matches and the right screen opens.Run
adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://www.example.com/products/42", with no package, to see what a real tap does.Run
adb shell pm get-app-links com.example.appon Android 12 and later and look forverifiednext to each host.Add
--debug-linktoam starton Android 17 and later to see which filters and rules matched the URL.
A link that opens the app with the package named but not without it is a verification problem, not a filter problem. More methods, from Chrome to test tools, are in the guide to test deep links on Android, and Smler's page on deep linking shows how one https link covers installed, not installed and desktop visitors. A test that fails points to one of a short list of causes.
Why is an Android deep link not opening the app?
An Android deep link is not opening the app because the intent filter doesn't match the URL, the web link isn't verified, or the person chose another app or the browser under Open by default. A filter problem shows in the adb test with the package named. A verification problem shows as any state other than verified in pm get-app-links. A user's choice shows under Settings, Apps, the app, Open by default. When an android deep link is not opening the app, the nine causes, their symptoms, the adb checks and each fix are in Android App Links not working. One case is not a failure at all: the person doesn't have the app.
Where does an Android deep link send people who lack the app?
An Android deep link sends people who lack the app to the website when it is a web link or an App Link, and nowhere useful when it is a custom scheme link, which has no web page to fall back to. That is the android deep link app not installed case, and a plain deep link loses its destination there. A deferred deep link keeps it: it sends the person to Google Play and opens the same screen on the first launch after install, read through the Play Install Referrer on Android. Smler hosts assetlinks.json for each link domain and carries the link through the install with deferred deep linking. Its Free plan covers 25,000 attributed installs a month with unlimited clicks, and paid plans start at $19 a month (Smler pricing).