Requirements
Before integrating the AppDNA Android SDK, ensure your project meets the following minimum requirements:
| Requirement | Minimum Version |
|---|
| minSdk | 24 |
| targetSdk | 34 |
| compileSdk | 34 |
| Kotlin | 1.9.22+ |
| Java | 17 |
Projects targeting API levels below 24 (Android 7.0) are not supported. The SDK uses Kotlin coroutines and modern Android APIs that require minSdk 24 as a baseline.
Installation
Gradle (Kotlin DSL)
Add the AppDNA SDK to your module-level build.gradle.kts:
dependencies {
implementation("ai.appdna:sdk:1.0.0")
}
Gradle (Groovy DSL)
If your project uses Groovy-based Gradle files, add the following to your build.gradle:
dependencies {
implementation 'ai.appdna:sdk:1.0.0'
}
Then sync your project with Gradle files.
Dependencies
The following dependencies are automatically included with the SDK. You do not need to add them manually:
| Dependency | Version | Purpose |
|---|
| Firebase Firestore | 24.10.0 | Real-time remote configuration sync |
| OkHttp3 | 4.12.0 | HTTP networking |
| Google Play Billing | 7.0.0 | In-app purchase and subscription handling |
| Kotlin Coroutines | 1.7.3 | Asynchronous operations |
If your project already includes these dependencies, ensure your version constraints are compatible with the versions listed above. Gradle will resolve version conflicts automatically in most cases, but you may need to add resolution strategies for major version mismatches.
Optional Dependencies
| Dependency | Version | Inclusion | Purpose |
|---|
| RevenueCat SDK | 7.0.0 | compileOnly | RevenueCat billing provider |
RevenueCat is declared as compileOnly and is only required if you configure RevenueCat as your billing provider. If you do not use RevenueCat, you do not need to add it.
Jetpack Compose
The SDK uses Jetpack Compose for rendering paywalls and onboarding flows. Compose is enabled automatically using BOM 2024.01.00. Ensure your project has Compose enabled in your module-level build.gradle.kts:
android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.8"
}
}
Verify Installation
After adding the SDK, verify it is correctly installed by importing the module and logging the SDK version:
import ai.appdna.sdk.AppDNA
import android.util.Log
Log.d("AppDNA", AppDNA.sdkVersion) // "1.0.0"
You should see 1.0.0 printed in Logcat. If you get an unresolved reference error, clean your project (Build > Clean Project) and rebuild.
Next Steps
Once the SDK is installed, proceed to the Quickstart guide to configure the SDK and start tracking events.