https://yourbrand.dshl.in/Ab12Cd) is an OS App Link and does not require this SDK. Recovering the original content after a Play Store install, and joining that first open to the store tap, does.
pending.appUrl, pending.utmSource / utmMedium / utmCampaign, pending.isDeferred, and pending.clickId come from the JSON resolve body.
The SDK resolves App Links and recovers the original destination on first open after a Play Store install, joining that open to the same click_id as the store tap.
When you need the SDK
Without the SDK, a fresh install opens on the home screen and the store tap cannot be joined to first open. See Receive for the routing vs deferred map.
Install
Maven coordinates will be published asai.dashlink:dashlink-android:1.0.0. Until then, include the library module or build an AAR from the dashlink-android repo.
Dynamic Link API key
JSON resolve that writes tracking requires a Dynamic Link API key. REST keys (dlk_live_) are rejected.
- In the dashboard, go to Settings → API Keys → Type Dynamic Link.
- Copy the
dlk_sdk_…key once and callDashlink.configurebeforegetInstance/getDynamicLink. - The SDK sends it as
X-API-Key(header only). A leaked APK key can hit that org’s resolve URL; it cannot call the dashboard REST API.
Declare the Dynamic Link host
Dashlink already hostsassetlinks.json on the Dynamic Link domain. The app must still declare that host. App Links are host-wide: put an autoVerify intent-filter on {subdomain}.dshl.in, not only the marketing site.
Receive live taps
CallgetDynamicLink from the Activity that handles the VIEW intent, and from onNewIntent if launchMode is singleTop / singleTask.
setDynamicLinkHosts restricts which https URLs the SDK treats as Dashlink short URLs. If you skip it, any https intent with a back-half is resolved.
On an installed tap the SDK JSON-resolves the short URL (deferred=0, match=direct), returns app_url, and analytics records app_open. The query parameters the SDK sends are listed on Receive.
Deferred first-open
When the app is missing, Dashlink 302s to the Play listing with:- Calls Play Install Referrer once.
- Decodes that URL.
- JSON-resolves with
deferred=1,match=referrer, and the recoveredclick_id. - Returns
PendingDynamicLink(appUrl, UTMs,isDeferred=true,clickId). - Marks deferred consumed in SharedPreferences (
ai.dashlink.sdk/deferred_consumed) so a later launch does not re-fire.
intent.data is already a Dashlink URL (installed tap), that wins and referrer is skipped.
A 401 on JSON resolve means the key is missing, not a Dynamic Link key, revoked, or bound to another organization — no deferred_open is published.
Misses
An empty referrer, a foreign URL, or a referrer that is not this app’s Dynamic Link host is a miss. The SDK still marks deferred consumed. There is no silent home-screen drop that looks like success in analytics: the first-open path either yieldsdeferred_open (when a joinable URL was recovered) or nothing to navigate.
A miss is expected when the user installed from Play search rather than the Dynamic Link, or when Play stripped the referrer.
Clearing app data re-runs recovery. Reinstall without data clear may still see Play’s cached referrer — Play documents that the referrer API is valid for a limited window after install.
Recovery uses the Play Install Referrer value only. If the user never opened Play through a Dynamic Link that carried referrer=, or Play did not return that referrer, there is no destination to recover.
Tracking
The store 302 is the click. SDK JSON resolve is an outcome on that click whenclick_id matches, not a second campaign click.
Campaign totals should unique-count by
click_id. Do not add deferred_open to click volume. Replay of the same click_id still returns app_url but does not publish a second deferred_open.
Test on a device
Simulators do not exercise App Link verification the way a real device does.1
Uninstall the app
So the next tap takes the store path.
2
Tap a staging Dynamic Link
The device 302s to Play. The referrer carries the short URL and
dl_cid.3
Install the debug APK
Sideload the build that includes the SDK and the
autoVerify filter.4
Open once
First open must land on
app_url. Analytics must show deferred_open for the same click_id as the store tap.