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
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:
| Field | Example | Description |
|---|---|---|
| Android Package Name | com.example.myapp | Must match your applicationId in build.gradle |
| Android SHA-256 | AB:CD:EF:12:34:... | Certificate fingerprint (colon-separated) |
| Android Play Store URL | https://play.google.com/store/apps/details?id=com.example.myapp | Fallback 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
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
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 viaassetlinks.json. Without this, a disambiguation dialog appears.android:launchMode="singleTask"prevents multiple Activity instances. New links are delivered viaonNewIntentinstead of creating a new Activity.
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.
Step 4: Handle App Links in Code
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);
}
}
}
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.
Step 5: Verify the Asset Links File
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_namematches yourapplicationIdexactlysha256_cert_fingerprintscontains your certificate fingerprint
You can also use Google's official verification tool: https://developers.google.com/digital-asset-links/tools/generator
Step 6: Test App Links
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
Verify Link Handling Status
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
- Generate a real link via the SDK or the OpenLynk dashboard.
- Send it to yourself via email or a messaging app.
- Tap the link on your Android device.
- The app should open directly without a disambiguation dialog.
- Verify your
onDeepLinkcallback fires with the correct destination.
Clearing Verified Link State (for Re-testing)
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)
| Cause | Fix |
|---|---|
autoVerify not set | Add android:autoVerify="true" to every intent filter |
| Wrong SHA-256 | Verify the fingerprint matches your signing certificate |
| Asset links file inaccessible | Visit the asset links URL in a browser (see Step 5) |
| Package name mismatch | Ensure applicationId in build.gradle matches the dashboard |
| Multiple intent filters without autoVerify | All intent filters must have android:autoVerify="true" |
App opens but does not navigate
- Check that
handleIncomingUriis called in bothonCreateandonNewIntent. - 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.gradleand the OpenLynk dashboard - SHA-256 fingerprint entered in the dashboard (debug and release)
- Intent filter added with
android:autoVerify="true" -
android:scheme="https"and correctandroid:hostset -
android:launchMode="singleTask"on the Activity -
assetlinks.jsonaccessible (HTTP 200, valid JSON) -
package_nameandsha256_cert_fingerprintsmatch inassetlinks.json -
handleIncomingUricalled inonCreateandonNewIntent - App opens directly without a disambiguation dialog
- Navigation works from cold start and background
What's Next?
- Learn more about how deep linking works under the hood.
- See the full Android Kotlin SDK reference for all available methods and configuration options.
- Set up iOS Universal Links if your app also targets iOS.