Client SDKs
Installation
How to install the AudienceLab Android SDK
The AudienceLab Android SDK is distributed primarily as a Maven artifact, with a versioned release AAR as a fallback.
Gradle (Recommended)
Add the package repository and dependency to your Android project.
GitHub Packages example:
repositories {
maven {
url = uri("https://maven.pkg.github.com/Geeklab-Ltd/audiencelab_android_sdk")
credentials {
username = providers.gradleProperty("gpr.user").orNull
password = providers.gradleProperty("gpr.key").orNull
}
}
}Then add the dependency:
dependencies {
implementation("ai.audiencelab:audiencelab-android-sdk:1.1.8")
}Manual AAR Installation
- Download the latest versioned
.aarfrom the releases page - Place it in your app's
libs/directory - Add to your
build.gradle.kts:
dependencies {
implementation(files("libs/audiencelab-sdk-release-1.1.8.aar"))
}Android Manifest
The SDK requires internet permission:
<uses-permission android:name="android.permission.INTERNET" />ProGuard / R8
If you use code minification, add these rules to your proguard-rules.pro:
-keep class app.geeklab.audiencelab.sdk.** { *; }Verify Installation
import app.geeklab.audiencelab.sdk.AudienceLabSDK
Log.d("AudienceLab", AudienceLabSDK.getSdkVersion())