Docs

Installation

Add lander-android to your app with one Gradle dependency.

Check your minSdk

lander-android supports Android API 24 (Android 7.0) and newer. If your app's minSdk is lower, raise it first:

app/build.gradle.kts
android {
    defaultConfig {
        minSdk = 24
    }
}

The SDK is compiled for Java 17 bytecode, which every current Android Gradle Plugin targets. Kotlin apps need Kotlin 2.1 or newer.

Add the dependency

The current published release is link.golander:lander-android:0.1.0 on Maven Central.

app/build.gradle.kts
dependencies {
    implementation("link.golander:lander-android:0.1.0")
}

The SDK is resolved from mavenCentral(), which new Android projects already list in settings.gradle.kts.

Building from source

Clone github.com/SwiftwareIO/lander_android. From its root, ./gradlew :lander:publishToMavenLocal installs link.golander:lander-android:0.1.0 into ~/.m2; add mavenLocal() to your repositories to use that build.

Import it

Everything public is in one package:

import link.lander.android.Lander
import link.lander.android.LanderLink

It contains Lander, LanderLink, LanderShortLink, LanderLinkOptions, LanderConfidence, LanderException, and for Java LanderLinkListener, LanderSubscription and LanderCallback.

What the SDK adds for you

  • The INTERNET permission. The SDK's manifest declares it, and Android merges it into your app.
  • Two small dependencies: org.jetbrains.kotlinx:kotlinx-coroutines-android and com.android.installreferrer:installreferrer (to read the Play Install Referrer once, on first launch, for deferred deep links). HTTP goes through the platform's HttpURLConnection and JSON through the platform's org.json, so there is no OkHttp, Retrofit or serialization library to reconcile with yours.
  • No R8 or ProGuard rules to add. The SDK uses no reflection.
  • Lifecycle tracking. initialize registers activity lifecycle callbacks on your Application, so the SDK can flush events when the app goes to the background without you forwarding anything.

You still need to tell Android that your app owns your Lander link domain. That is the next step.

Next steps

On this page