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:
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.
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.LanderLinkIt contains Lander, LanderLink, LanderShortLink, LanderLinkOptions, LanderConfidence, LanderException, and for Java LanderLinkListener, LanderSubscription and LanderCallback.
What the SDK adds for you
- The
INTERNETpermission. The SDK's manifest declares it, and Android merges it into your app. - Two small dependencies:
org.jetbrains.kotlinx:kotlinx-coroutines-androidandcom.android.installreferrer:installreferrer(to read the Play Install Referrer once, on first launch, for deferred deep links). HTTP goes through the platform'sHttpURLConnectionand JSON through the platform'sorg.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.
initializeregisters activity lifecycle callbacks on yourApplication, 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
Android SDK
lander-android receives, resolves and creates Lander links in native Android apps written in Kotlin or Java, and reports conversions.
App Links setup
Claim your Lander domain with a verified App Links intent filter, register your signing fingerprints on the Platforms page, add an optional custom scheme and hand intents to the SDK.