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 |
Installation
Gradle (Kotlin DSL)
Add the AppDNA SDK to your module-levelbuild.gradle.kts:
Gradle (Groovy DSL)
If your project uses Groovy-based Gradle files, add the following to yourbuild.gradle:
Firebase Configuration
The AppDNA SDK uses Firebase Firestore for real-time configuration delivery (paywalls, experiments, feature flags, onboarding flows) and Firebase Cloud Messaging for push notifications. You must add a Firebase configuration file to your project.Step 1: Download google-services-appdna.json
- Log into your AppDNA Console
- Go to Settings → SDK
- Click Download Firebase Config to download
google-services-appdna.json
Step 2: Add to Your Project
Place thegoogle-services-appdna.json file in your app module directory:
Step 3: Apply the Google Services Plugin
Add the Google Services classpath to your project-levelbuild.gradle (or build.gradle.kts):
build.gradle (or build.gradle.kts):
If your app already uses Firebase for your own services (Analytics, Crashlytics, Realtime Database), AppDNA automatically creates a separate named Firebase instance using
google-services-appdna.json. Your existing Firebase setup is not affected. Just add the AppDNA config file alongside your own google-services.json.Dependencies
The following dependencies are automatically included with the SDK. You do not need to add them manually:| Dependency | Version | Purpose |
|---|---|---|
| Firebase Firestore | 25.1.1 | Real-time remote configuration sync |
| Firebase Messaging | 24.1.0 | Push notification delivery (FCM) |
| 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 |
| Lottie Compose | 6.4.0 | Lottie animation rendering |
| Rive Android | 9.0.0 | Rive animation rendering |
| WorkManager | 2.9.0 | Background event upload |
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 |
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 BOM2024.01.00. Ensure your project has Compose enabled in your module-level build.gradle.kts:
Verify Installation
After adding the SDK, verify it is correctly installed by importing the module and logging the SDK version:You should see
1.0.30 printed in Logcat. If you get an unresolved reference error, clean your project (Build > Clean Project) and rebuild.
