For HTTP/HTTPS deep links to work reliably, you need to verify that your app is the legitimate owner of the domain. This verification process is different for Android (App Links) and iOS (Universal Links).

This guide explains how to verify your domains for both platforms and integrate with Linkrunner.

Android App Links Verification

Android App Links allow your app to become the default handler for a specific website’s URLs. This requires proper verification of your domain ownership.

Step 1: Create the Digital Asset Links JSON File

Create a file named assetlinks.json with the following content:

[
    {
        "relation": ["delegate_permission/common.handle_all_urls"],
        "target": {
            "namespace": "android_app",
            "package_name": "your.package.name",
            "sha256_cert_fingerprints": ["SHA-256:XX:XX:XX:..."]
        }
    }
]

Replace:

  • your.package.name with your actual Android package name
  • SHA-256:XX:XX:XX:... with your app’s SHA-256 fingerprint

Step 2: Get Your App’s SHA-256 Fingerprint

To obtain your app’s SHA-256 fingerprint:

  1. For debug builds, use:

    keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
    
  2. For release builds, use your release keystore:

    keytool -list -v -keystore your_release_keystore.keystore -alias your_key_alias
    
  3. Look for the “SHA-256 Certificate fingerprint” line in the output

Setting Up Verification with Linkrunner

Linkrunner provides a simplified way to manage your domain verification files through the project settings dashboard.

Step 1: Access Domain Verification in Linkrunner

  1. Log in to your Linkrunner dashboard
  2. Go to “Project settings” from the navigation menu

Step 2: Configure Your Verification Objects

  1. Prepare your verification JSON objects:

    • For iOS: Create the apple-app-site-association JSON content
    • For Android: Create the assetlinks.json content
  2. In the Domain Verification section:

    • Paste your iOS JSON in the “iOS (Only JSON allowed)” text area
    • Paste your Android JSON in the “Android (Only JSON allowed)” text area

    Linkrunner will automatically host these files at:

    • iOS: https://your-domain.io/.well-known/apple-app-site-association
    • Android: https://your-domain.io/.well-known/assetlinks.json
  3. Click the “Save” button to store your configuration

Step 3: Verify Your App Configuration

After configuring in Linkrunner, you need to:

  1. For iOS: Ensure your app has the Associated Domains capability with applinks:your-domain.io in Xcode
  2. For Android: Verify your app’s intent filters are properly configured for App Links

Testing Deep Link Verification for Android

  1. Install the app on a device
  2. Open a link to your verified domain in a browser
  3. The app should open automatically without prompting

Alternatively, use adb to test:

adb shell am start -a android.intent.action.VIEW -d "https://your-domain.com/path" your.package.name

Troubleshooting for Android

  1. App doesn’t open automatically:

    • Ensure your assetlinks.json file is correctly formatted
    • Verify the SHA-256 fingerprint matches your app signing key
    • Make sure the file is accessible via HTTPS
  2. Verification warnings in logcat:

    • Look for “IntentFilterIntentSvc” messages in logcat for details on verification failures