Skip to content
Dashboard

Testing & Troubleshooting

Testing deferred linking on Android has platform constraints, mainly around install referrer availability and app-link verification state.

  • Deferred matching is intended for first-launch flow after install.
  • Deterministic matching uses Play Install Referrer click_id when available.
  • If install referrer is unavailable, SDK falls back to probabilistic matching.
  • Repeated deferred attempts in same install/session return NotFirstLaunch.
  1. Uninstall the app from the device or emulator.
  2. Open a Detour link in a browser.
  3. Install and launch the app.
  4. Verify LinkResult.Success with type = DEFERRED, or expected fallback (NoLink / Error).
  5. Relaunch the app and confirm the deferred link is not consumed again, that is LinkResult.NotFirstLaunch.

For app-link/scheme integration (LinkProcessingMode.ALL), verify both cold and warm starts.

Terminal window
adb shell am start -a android.intent.action.VIEW \
-d "https://<your-link-domain>/products/42" \
<your.package.name>

Expected: LinkResult.Success with type = VERIFIED.

Terminal window
adb shell am start -a android.intent.action.VIEW \
-d "myapp://products/42" \
<your.package.name>

Expected: LinkResult.Success with type = SCHEME (only when LinkProcessingMode.ALL).

Section titled “App Link verification and the SHA-256 fingerprint”

An autoVerify App Link opens your app only if the Dashboard SHA-256 matches the key that signed the installed APK:

How the app is installedSigned withWhere to read the SHA-256
Google Play, any trackPlay App Signing keyPlay Console → Protected with Play → Manage Play app signing → App signing key certificate
Android Studio run / ./gradlew assembleDebugAGP default debug keystorekeytool -list -v -keystore ~/.android/debug.keystore -storepass android, or ./gradlew signingReport
./gradlew assembleRelease with your own configYour release keystorekeytool -list -v -keystore <path-to-your.keystore>, or ./gradlew signingReport

./gradlew signingReport prints the Store: path each variant really uses, so it stays correct when a project overrides signingConfigs.debug. To check a binary directly: apksigner verify --print-certs app-debug.apk.

Then check what the device made of it:

Terminal window
adb shell pm verify-app-links --re-verify <your.package.name>
adb shell pm get-app-links <your.package.name> # expect: verified

The complete procedure is described in Finding your Android SHA-256 fingerprint.

Detour SDK not initialized

Detour.initialize(...) was not called before processLink() / getDeferredLink().

App/Universal link returns NoLink despite a valid click

Your plan’s click limit may be exceeded. Look for [Detour:CLICK_LIMIT_ERROR] in logcat. See Click limits.

Always NotFirstLaunch

The first-launch flag is already stored. Reinstall the app to test the deferred flow again.

Custom scheme not handled

Verify the manifest <data android:scheme="..." /> entry and that linkProcessingMode is LinkProcessingMode.ALL.

Analytics events not visible

Ensure apiKey and appId are valid, and call DetourAnalytics only after SDK initialization.

Use logcat while testing:

Terminal window
adb logcat | grep -i detour

Useful tags from SDK internals:

  • Detour
  • DetourApiClient
  • InstallReferrerHelper
  • DetourAnalytics

For complete end-to-end sample flows, use Examples.