For MarketersFor DevelopersFor Product
11 min read

Android App Links

An Android App Link is an https:// URL that Android opens directly in your app, without a chooser and without the browser, because the system has verified that your domain trusts your app. Verification is the whole feature: an unverified link is just a web link.

This guide is the reference for how that verification works and how to find out why it failed. For a broader walkthrough of Android deep linking, including deferred deep linking and the Play Install Referrer, see the Android deep linking guide on our blog. For why verified links are safer than custom schemes, see URI schemes vs. Universal Links.

What you'll learn

  • What Android verifies, when, and what happens when verification fails
  • Writing a correct assetlinks.json, and choosing the right SHA-256 fingerprint
  • Reading verification state on a device with adb
  • A failure-by-failure troubleshooting checklist

How verification works

  1. Your manifest declares an intent filter with android:autoVerify="true" for https URLs on your host.
  2. Your domain serves a Digital Asset Links file at https://<host>/.well-known/assetlinks.json that names your package and its signing certificate fingerprint.
  3. Android checks the file for each host in those filters, asynchronously, after the app is installed or updated.
  4. On a match, the host is marked verified and taps on matching links go straight to your app.

App Links work on Android 6 (API level 23) and later, on devices with Google services installed.

What happens when verification fails

This changed in Android 12, and it explains most "it used to show a chooser" reports:

Android versionUnverified https link
Android 12 (API 31) and laterOpens in the user's default browser. Your app is not offered at all unless the user approves the domain in settings.
Android 11 and earlierShows the "Open with" chooser (or uses a previous user choice).

Android 12 also verifies each host separately. On Android 11 and earlier, the system makes your app the default handler only if it finds a matching file for all hosts in the manifest, so one broken host breaks every App Link in the app.

Key Concept

On Android 12 and later, "the link opens in Chrome" is the normal symptom of failed verification. There is no error message. You find the cause by checking the verification state on the device and the file on your server.

The intent filter

<activity android:name=".MainActivity" android:exported="true"
          android:launchMode="singleTask">
    <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:scheme="https" />
        <data android:host="links.example.com" />
    </intent-filter>
</activity>

Points that decide whether verification runs:

  • VIEW, DEFAULT and BROWSABLE are all required. Without BROWSABLE, links from a browser cannot reach the activity.
  • The https scheme must be declared. Android 12 and later only auto-verify filters that include BROWSABLE and https.
  • Every host you list must be one you control. A host your app cannot verify (a test URL behind a VPN, or a partner domain) fails verification, and on Android 11 and earlier takes the other hosts down with it. Google suggests using build variants to keep test hosts out of release manifests.
  • Path attributes (pathPrefix, pathPattern) only narrow which URLs your app receives. They do not affect verification, which is per host.
  • Each subdomain is its own host. example.com and www.example.com each need their own assetlinks.json.

The assetlinks.json file

[
  {
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
      "namespace": "android_app",
      "package_name": "com.example.app",
      "sha256_cert_fingerprints": [
        "14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5"
      ]
    }
  }
]
FieldWhat it must contain
Top levelA JSON array of statements, even with only one
relationdelegate_permission/common.handle_all_urls for App Links
namespaceandroid_app
package_nameThe applicationId of the installed build, exactly
sha256_cert_fingerprintsOne or more 32-byte SHA-256 fingerprints, colon-separated, uppercase

One file can list several apps, and one statement can list several fingerprints, which is how you support debug and release builds side by side.

Serving requirements, from Android's documentation:

  • HTTPS, even if your intent filter also declares http
  • HTTP 200 with no redirects (no 301 or 302)
  • Content-Type: application/json
  • Reachable from the public internet, not only from your office network or VPN
Try It

Check your file with the assetlinks.json validator. It fetches the file, checks status, redirects, content type, JSON structure, the handle_all_urls relation, package name format and fingerprint format (including lowercase), confirms your package and fingerprint are listed if you enter them, and asks Google's Digital Asset Links API which apps it sees for your domain.

Choosing the right SHA-256 fingerprint

The fingerprint must match the certificate that signed the APK installed on the device. Which certificate that is depends on how the build was produced:

BuildSigned byWhere to get the fingerprint
Local debug buildYour debug keystore./gradlew signingReport, or keytool on ~/.android/debug.keystore
Release build you distribute yourselfYour release keykeytool -list -v -keystore release.keystore -alias your-alias
Installed from Google Play with Play App SigningGoogle's app signing keyPlay Console, on the App signing page
Gotcha

With Play App Signing, the key you sign uploads with (the upload key) is not the key users' devices see. Google re-signs your app with the app signing key. If your file lists only the upload key fingerprint, App Links work in your local release build and fail for every Play user. Copy the app signing key certificate fingerprint from Play Console; that page also shows a ready-made Digital Asset Links snippet. Google's docs list it under Release > Setup > App signing, though the menu wording has moved over time.

If you test debug builds, internal sharing builds and Play builds, list all of their fingerprints. Extra fingerprints do no harm.

To see which certificate signed the build that is actually on a device, read the Signatures line in the pm get-app-links output (next section) and compare it with your file.

Checking verification on a device

On Android 12 and later, these adb commands show and control verification. Replace com.example.app with your package name.

# Show the verification state for each host
adb shell pm get-app-links com.example.app

# Reset to the state before the user chose any default apps
adb shell pm set-app-links --package com.example.app 0 all

# Re-run verification, then wait a few minutes before checking again
adb shell pm verify-app-links --re-verify com.example.app

Output looks like this:

com.example.app:
  ID: 01234567-89ab-cdef-0123-456789abcdef
  Signatures: [14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5]
  Domain verification state:
    links.example.com: verified
    www.example.com: 1024

What the states mean:

StateMeaning
verifiedVerification succeeded. Only this state means the host is a working App Link.
noneNothing recorded yet. Wait for the verification agent, then re-verify.
approved / deniedForced by a shell command, usually during testing
migrated / restoredCarried over from legacy verification or a data restore
legacy_failureRejected by a legacy verifier; reason unknown
system_configuredApproved by the device configuration
1024 or higherA verifier-specific error code. Treat it as a failure and check the file and fingerprint.

On Android 17 and later, adb shell am start --debug-link -a android.intent.action.VIEW -d "https://links.example.com/item/1" explains how a specific URL resolves, including which rule blocked it.

Android Studio's App Links Assistant and the Deep links page in Play Console offer the same kind of checks in a UI.

When changes to assetlinks.json reach devices

Android documents the timing by version:

  • Android 15 and later: changes can take up to seven days to reach all devices, because of caching and scheduled re-verification.
  • Android 14 and earlier: the file is typically only re-read when the app is installed or updated.

On a test device, do not wait: reinstall the app, or run pm verify-app-links --re-verify and check pm get-app-links a few minutes later. Google's Digital Asset Links API also caches results, so a file you just fixed can take a while to show there:

https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://links.example.com&relation=delegate_permission/common.handle_all_urls

Troubleshooting

The link opens in Chrome (Android 12+) or shows a chooser (Android 11 and earlier)

Verification failed or has not run. Check in this order:

  1. pm get-app-links on the device. Anything other than verified for the host means the problem is verification, not your app code.
  2. The file itself. curl -i https://links.example.com/.well-known/assetlinks.json: HTTP 200, application/json, valid JSON array, no redirect.
  3. Redirects at the host level. http://example.com to https://example.com, or example.com to www.example.com, causes verification to fail. Android's troubleshooting guide also suggests checking that example.com. (with a trailing period) serves the same content.
  4. Fingerprint. Compare the Signatures value from the device with the file. The usual culprits are the Play upload key instead of the app signing key, a debug build against a release-only file, and lowercase hex.
  5. Package name. The applicationId of the build, including any .debug suffix from a build variant.
  6. Intent filter. autoVerify="true", BROWSABLE, https, and no hosts you cannot verify.

It works with adb am start but not when tapped

adb shell am start -a android.intent.action.VIEW -d <url> proves your activity handles the URL. It is not proof that a tap from a browser or messaging app will open it, so always finish with a real tap.

It does not open when pasted into Chrome

Expected. Chrome does not hand a URL typed or pasted into its address bar to an app, and a redirect chain that started from a typed URL will not launch one either (Chrome documents this for intent: URLs). Tap the link from a message, an email or a note instead. The deep link tester gives you a QR code so you can open a test page on your phone and tap the link there.

It works for you but not for one user

The user can turn link handling off in Settings > Apps > your app > Open by default (wording varies by manufacturer). Some apps also open links in their own in-app browser, which may load the page instead of handing it to Android; test from the apps your users actually share links in.

Links open the app but land on the wrong screen

That is app code, not verification. If the activity is already running (singleTask or singleTop), the new URL arrives in onNewIntent, not onCreate:

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    intent?.data?.let(::handleLink)
}

override fun onNewIntent(intent: Intent) {
    super.onNewIntent(intent)
    setIntent(intent)
    intent.data?.let(::handleLink)
}

Validate the URL before acting on it: any app can send your activity an intent with an arbitrary URL.

Jetpack Compose and Navigation

Navigation's navDeepLink { uriPattern = ... } can route matching URLs to destinations. You still need the manifest intent filter with autoVerify for the link to be verified.

Flutter and React Native

In Flutter, use the app_links package or Flutter's built-in deep linking. Since Flutter 3.27, built-in deep linking is on by default, and Flutter's docs say apps using a plugin such as app_links must add flutter_deeplinking_enabled meta-data set to false in the activity. In React Native, use Linking.getInitialURL() and the url event.

Ulinkly SDK

If you use the Ulinkly Android, Flutter or React Native SDK, follow its setup guide for intent handling. The intent filter still has to list your Ulinkly domain with autoVerify.

How Ulinkly handles this

For every domain registered in your project, both your-subdomain.shared.ly and custom domains you add under Domains, Ulinkly generates and serves /.well-known/assetlinks.json from the package name and SHA-256 fingerprints you enter under Configuration > Android. The file grants handle_all_urls to your package and lists every fingerprint you add, so you can include your debug key, your release key and the Play app signing key together. Paste fingerprints in the colon-separated form that keytool and Play Console show; the dashboard stores them in uppercase.

You still have to:

  1. Add the intent filter with autoVerify="true" and your Ulinkly host to the manifest.
  2. Add the fingerprint of every certificate that signs a build you test or ship, especially the Play app signing key.
  3. Reinstall or re-verify on test devices after changing the configuration.

The ulink verify command in the Ulinkly CLI checks the manifest intent filter, package name, fingerprints, the served assetlinks.json and the Android 12+ verification state.

Frequently asked questions

Do I need a separate assetlinks.json for www and the apex domain?

Yes. Android verifies each host in your intent filters, and each one must serve its own file directly. Redirecting one to the other breaks verification.

Why do App Links work in my release build but not from the Play Store?

Almost always Play App Signing: your local release build is signed with your upload key, while Play delivers a build signed with Google's app signing key. Add the app signing key fingerprint from Play Console.

Can I verify App Links with an http intent filter?

You can declare http alongside https, but the file is always fetched over HTTPS, and on Android 12 and later auto-verification requires the https scheme in the filter.

What happens when the app is not installed?

The link opens in the browser and loads your web page, which can send the user to Google Play or a web fallback. Opening specific content after install is deferred deep linking, covered in Deferred deep links; in Ulinkly it is part of the paid plans, Starter and up.

Quick recap

  • App Links are verified per host from assetlinks.json; on Android 12+ an unverified link opens in the browser.
  • The fingerprint must match the certificate that signed the installed APK; with Play App Signing that is Google's app signing key, not your upload key.
  • Serve the file over HTTPS with HTTP 200, application/json and no redirects, on every host.
  • Diagnose with adb shell pm get-app-links, re-run with pm verify-app-links --re-verify, and test by tapping a real link.