Skip to main content

Android App Links Setup

App Links let your Android app open when a user taps an OpenLynk link, without showing a disambiguation dialog asking the user to choose between your app and a browser. This guide walks through every step from dashboard configuration to on-device testing.

Prerequisites

Before you begin, make sure you have:

  • An Android app with a valid package name (e.g. com.example.myapp)
  • Your app's SHA-256 certificate fingerprint
  • Your app registered in the OpenLynk dashboard with Android settings configured
info

App Links require HTTPS and a properly served Digital Asset Links file (assetlinks.json). OpenLynk handles both of these for you automatically.

Step 1: Configure Your App in OpenLynk

In the OpenLynk dashboard, go to your app and open Settings. Fill in the Android fields:

FieldExampleDescription
Android Package Namecom.example.myappMust match your applicationId in build.gradle
Android SHA-256AB:CD:EF:12:34:...Certificate fingerprint (colon-separated)
Android Play Store URLhttps://play.google.com/store/apps/details?id=com.example.myappFallback when the app is not installed

Once saved, OpenLynk automatically generates and hosts the Digital Asset Links file at:

https://YOUR_APP_SLUG.openlynk.to/.well-known/assetlinks.json
tip

You do not need to create, host, or maintain the assetlinks.json file yourself. OpenLynk keeps it in sync whenever you update your Android settings.

Step 2: Get Your SHA-256 Fingerprint

You need the SHA-256 certificate fingerprint for the signing certificate used to build your app.

Debug Certificate

keytool -list -v \
-keystore ~/.android/debug.keystore \
-alias androiddebugkey \
-storepass android \
-keypass android

Release Certificate

keytool -list -v \
-keystore /path/to/your-release-key.keystore \
-alias your-alias

Google Play App Signing

If you use Google Play App Signing, get the fingerprint from the Google Play Console:

Google Play Console -> your app -> Setup -> App Signing -> App signing key certificate -> SHA-256 fingerprint

warning

If you use Google Play App Signing, you must use the fingerprint from the Play Console, not from your local upload keystore. The Play Console re-signs your app with a different certificate.

Enter the SHA-256 fingerprint (colon-separated format) in the OpenLynk dashboard.

Step 3: Add Intent Filter in AndroidManifest.xml

Add an intent filter to your main Activity so Android knows to route OpenLynk URLs to your app:

<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask">

<!-- OpenLynk deep links -->
<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"
android:host="YOUR_APP_SLUG.openlynk.to" />
</intent-filter>

<!-- Custom domain (if using one) -->
<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"
android:host="links.mycompany.com" />
</intent-filter>
</activity>

Key attributes:

  • android:autoVerify="true" tells Android to verify domain ownership via assetlinks.json. Without this, a disambiguation dialog appears.
  • android:launchMode="singleTask" prevents multiple Activity instances. New links are delivered via onNewIntent instead of creating a new Activity.
caution

Every intent filter in your manifest that handles HTTPS links must include android:autoVerify="true". If any one is missing it, verification can fail for all of them.

When a user taps an App Link, Android launches your Activity. You must pass the incoming URI to the OpenLynk SDK so it can resolve the link and call your onDeepLink callback.

Kotlin

class MainActivity : AppCompatActivity() {
private val sdk: OpenlynkSDK
get() = (application as MyApplication).openlynkSDK

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

// Handle App Link from cold start
intent?.data?.let { uri ->
sdk.handleIncomingUri(uri)
}
}

override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
// Handle App Link when app is already running
intent.data?.let { uri ->
sdk.handleIncomingUri(uri)
}
}
}

Java

public class MainActivity extends AppCompatActivity {
private OpenlynkSDK sdk;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

sdk = ((MyApplication) getApplication()).getOpenlynkSDK();

// Handle App Link from cold start
Uri uri = getIntent().getData();
if (uri != null) {
sdk.handleIncomingUri(uri, null);
}
}

@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
// Handle App Link when app is already running
if (intent.getData() != null) {
sdk.handleIncomingUri(intent.getData(), null);
}
}
}
note

You must handle the URI in both onCreate (cold start) and onNewIntent (app already in memory). Missing either one causes links to silently fail in that scenario.

OpenLynk generates the assetlinks.json file automatically. Verify it is accessible by visiting:

https://YOUR_APP_SLUG.openlynk.to/.well-known/assetlinks.json

Confirm the following:

  • The page loads with an HTTP 200 status
  • package_name matches your applicationId exactly
  • sha256_cert_fingerprints contains your certificate fingerprint

You can also use Google's official verification tool: https://developers.google.com/digital-asset-links/tools/generator

Using ADB

Launch an App Link from the command line to verify your intent filter:

adb shell am start -a android.intent.action.VIEW \
-d "https://YOUR_APP_SLUG.openlynk.to/test-link" \
com.example.myapp

Check whether Android has verified your domain:

adb shell pm get-app-links com.example.myapp

Look for your domain with status verified.

Manual Testing

  1. Generate a real link via the SDK or the OpenLynk dashboard.
  2. Send it to yourself via email or a messaging app.
  3. Tap the link on your Android device.
  4. The app should open directly without a disambiguation dialog.
  5. Verify your onDeepLink callback fires with the correct destination.

If you need to reset the verification state during development:

adb shell pm set-app-links --package com.example.myapp 0 all
adb shell pm verify-app-links --re-verify com.example.myapp

Troubleshooting

Disambiguation dialog appears (user asked to choose browser or app)

CauseFix
autoVerify not setAdd android:autoVerify="true" to every intent filter
Wrong SHA-256Verify the fingerprint matches your signing certificate
Asset links file inaccessibleVisit the asset links URL in a browser (see Step 5)
Package name mismatchEnsure applicationId in build.gradle matches the dashboard
Multiple intent filters without autoVerifyAll intent filters must have android:autoVerify="true"

App opens but does not navigate

  • Check that handleIncomingUri is called in both onCreate and onNewIntent.
  • Add logging to verify the URI is passed to the SDK.
  • Verify the link exists in the OpenLynk dashboard.

Works in debug, fails in release

  • The release certificate SHA-256 is different from the debug certificate. Enter the release fingerprint in the dashboard.
  • If using Google Play App Signing, use the fingerprint from the Google Play Console, not your local keystore.

Checklist

  • Package name matches between build.gradle and the OpenLynk dashboard
  • SHA-256 fingerprint entered in the dashboard (debug and release)
  • Intent filter added with android:autoVerify="true"
  • android:scheme="https" and correct android:host set
  • android:launchMode="singleTask" on the Activity
  • assetlinks.json accessible (HTTP 200, valid JSON)
  • package_name and sha256_cert_fingerprints match in assetlinks.json
  • handleIncomingUri called in onCreate and onNewIntent
  • App opens directly without a disambiguation dialog
  • Navigation works from cold start and background

What's Next?