Skip to main content

Installation — Android SDK

The OpenCDP Android SDK is published to Maven Central.

Prerequisites​

  • Android API 24+
  • Kotlin 1.9+

Step 1 — Add the dependency​

In your app-level build.gradle.kts:

dependencies {
implementation("com.opencdp.sdk:opencdp-android:1.0.0-alpha03")
}

Ensure mavenCentral() is in your project settings.gradle.kts:

dependencyResolutionManagement {
repositories {
mavenCentral()
}
}

Sync Gradle.

Step 2 — Initialize in Application​

import com.opencdp.OpenCDP
import com.opencdp.OpenCDPConfig

class MyApplication : Application() {
override fun onCreate() {
super.onCreate()

val config = OpenCDPConfig(
cdpApiKey = "YOUR_CDP_API_KEY",
debug = true,
)

OpenCDP.initialize(this, config)
}
}

Register your Application class in AndroidManifest.xml if not already.

Verify it worked​

Build succeeds and Logcat shows [OpenCDP] init logs when debug = true.

Next steps​