Skip to content
Dashboard

Installation

Detour provides an Android SDK (com.swmansion:detour) for deferred deep links, app links, and scheme links.

Before installation, make sure your app is created in the Detour Dashboard and you have:

  • appId from API configuration
  • publishable apiKey from API configuration
  • Android link integration snippet from App configuration
  • Android min SDK: 21 (Android 5.0+)
  • Kotlin: 2.0+
  • JVM target: 11
dependencies {
implementation("com.swmansion:detour:1.0.1")
}

Store credentials in config/environment and pass them through BuildConfig (same pattern as SDK examples):

app/build.gradle.kts
buildConfigField("String", "DETOUR_API_KEY", "\"${secrets["DETOUR_API_KEY"] ?: ""}\"")
buildConfigField("String", "DETOUR_APP_ID", "\"${secrets["DETOUR_APP_ID"] ?: ""}\"")
// Activity/Application code
val config = DetourConfig(
apiKey = BuildConfig.DETOUR_API_KEY,
appId = BuildConfig.DETOUR_APP_ID
)

Call Detour.initialize(...) once before processing links.

Detour.initialize(applicationContext, config)

You can initialize in Application.onCreate() or in the first activity before calling processLink() / getDeferredLink().

Add VIEW intent filters for links you want Android to dispatch to your app:

  • verified App Links (https://...) from Dashboard snippet
  • optional custom URI scheme (myapp://...)

Example SDK apps use this pattern in AndroidManifest.xml and handle both app links and scheme links in one flow.

  1. Wire DetourDelegate or manual processing in Usage.
  2. Pick the closest runnable pattern in Examples.