Skip to content

WarpLinkApp/warplink-android-sdk

Repository files navigation

WarpLink Android SDK

CI License: MIT

Deep linking SDK for Android. Handle App Links, deferred deep links, and install attribution with zero third-party dependencies.

Requirements

  • Android API 26+ (Android 8.0+)
  • Kotlin 1.8+

Installation

Add the dependency to your app's build.gradle.kts:

dependencies {
    implementation("app.warplink:sdk:1.0.2")
}

Quick Start

1. Configure the SDK

Initialize WarpLink in your Application.onCreate():

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        WarpLink.configure(
            context = this,
            apiKey = "wl_live_your_api_key_here"
        )
    }
}

2. Add App Links Intent Filter

Add the following intent filter to your main Activity in AndroidManifest.xml so App Links open directly in your app:

<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="aplnk.to" />
</intent-filter>

3. Handle Deep Links

In your Activity, handle incoming deep links:

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

    intent?.data?.let { uri ->
        WarpLink.handleDeepLink(uri) { result ->
            result.onSuccess { deepLink ->
                // Navigate to deepLink.destination
            }.onFailure { error ->
                // Handle error
            }
        }
    }
}

4. Check for Deferred Deep Links

On first launch, check if the user arrived via a deferred deep link:

WarpLink.checkDeferredDeepLink { result ->
    result.onSuccess { deepLink ->
        deepLink?.let {
            // Navigate to deferred deep link destination
        }
    }
}

Configuration Options

WarpLink.configure(
    context = this,
    apiKey = "wl_live_your_api_key_here",
    options = WarpLinkOptions(
        debugLogging = true,       // Enable debug logging (default: false)
        matchWindowHours = 48      // Attribution match window (default: 72)
    )
)

Documentation

For hosted documentation, visit warplink.app/docs.

License

MIT - See LICENSE for details.

Packages

 
 
 

Contributors

Languages