Implementation of App Links for Android Application
App Links are verified deep links that Android opens directly in app without browser selection dialog. Difference is principal: normal intent-filter with http-scheme shows user "open in browser or app". App Links with verification via .well-known/assetlinks.json — opens app immediately. For marketing links, email campaigns and QR codes this directly affects conversion.
Technical mechanism
In manifest intent-filter specified with android:autoVerify="true" and https scheme. Android on app install (and on update, with API 31 — asynchronously in background) requests https://your-domain.com/.well-known/assetlinks.json and checks that SHA-256 fingerprint of app signature matches entry in file.
<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="example.com" />
</intent-filter>
File assetlinks.json placed on server with Content-Type application/json and without redirects — verifier doesn't follow redirects. Typical error: file returned with redirect http → https or with wrong MIME-type text/plain. Verification fails silently — in logs adb shell pm get-app-links --user 0 com.example.app see status 1024 (failed).
Signature fingerprint — not that from debug.keystore. Production App Links work only with release signature. Using Google Play App Signing need fingerprint from Google Play Console → Setup → App signing, not local keystore.
Where verification most often breaks
Multiple domains. App wants to open from both example.com, www.example.com, and m.example.com. Each domain needs its own intent-filter and own assetlinks.json on each subdomain. Forgot about www — links with www open in browser.
Subdomains and wildcards. android:host doesn't support wildcards like *.example.com. Each subdomain — separate entry. For apps with dynamic subdomains (multitenant SaaS) App Links unsuitable — need custom URI-scheme.
API 31+ and Package Visibility. With Android 12 verification behavior changed: if domain verified earlier, reverification on update happens asynchronously. During period before verification completes links may open with selection dialog. Solution — adb shell pm verify-app-links --re-verify com.example.app for forced verification in testing.
Handling in Activity. Intent with ACTION_VIEW comes in onCreate (on cold start) and in onNewIntent (if Activity already running with launchMode="singleTop" or singleTask). Miss onNewIntent — lose deep link on transition from background.
What we configure beyond basic verification
Parameters in URI path need correct parsing — via Uri.getQueryParameter(), not manual string parsing. If app uses Navigation Component, NavDeepLinkBuilder and deepLink {} in NavGraph handle URI → screen mapping declaratively.
For analytics each handled deep link should be logged with source — allows tracking conversion of marketing campaigns through Firebase Analytics or Amplitude.
Timeline: App Links setup with verification — 1-2 days. If need handling multiple domains, parameters and navigation integration — 2-3 days. Cost calculated individually.







