Skip to content

Installation

The Cimka Android SDK ships as a set of modules. Install the core, then add the UI module(s) that match your app.

Module Coordinate What it does
cimka com.cimka:cimka:1.1.1 Core: init, sessions & identify, trace logger, OkHttp interceptor, crash reporter, device audit & gate
cimka-xml com.cimka:cimka-xml:1.1.1 Automatic click, screen and lifecycle tracking for View/XML apps — zero per-screen code
cimka-compose com.cimka:cimka-compose:1.1.1 Screen and click tracking helpers for Jetpack Compose
cimka-offline com.cimka:cimka-offline:1.1.1 File-backed queue so logs survive network/API failures
cimka-plugin com.cimka:cimka-gradle-plugin:1.0.4 Build-time dependency inventory (Gradle plugin)

cimka-xml, cimka-compose and cimka-offline depend on cimka transitively.

  • Android minSdk 24 or higher (compileSdk 36 recommended)
  • Kotlin 2.0+, AGP 8.13+, Java 11 target
  • A license key, API key and application id from the Cimka dashboard

The SDK pulls in OkHttp 5 and Gson as api dependencies, and merges the INTERNET and ACCESS_COARSE_LOCATION permissions into your manifest.

  1. Create a GitHub token. Packages are hosted on GitHub Packages, which requires authentication even to read. Create a personal access token with the read:packages scope and add it to ~/.gradle/gradle.properties:

    ~/.gradle/gradle.properties
    gpr.user=<your-github-username>
    gpr.key=<your-token-with-read:packages>
  2. Add the repository in settings.gradle.kts:

    settings.gradle.kts
    dependencyResolutionManagement {
    repositories {
    google()
    mavenCentral()
    maven {
    url = uri("https://maven.pkg.github.com/cimka-resource/cimka-sdk-android")
    credentials {
    username = providers.gradleProperty("gpr.user").getOrElse(System.getenv("GITHUB_ACTOR") ?: "")
    password = providers.gradleProperty("gpr.key").getOrElse(System.getenv("GITHUB_TOKEN") ?: "")
    }
    }
    }
    }
  3. Add the dependencies in your app module:

    app/build.gradle.kts
    dependencies {
    implementation("com.cimka:cimka:1.1.1")
    // pick the one matching your UI toolkit (or both)
    implementation("com.cimka:cimka-xml:1.1.1")
    implementation("com.cimka:cimka-compose:1.1.1")
    // optional: queue logs on disk when the network/API is unavailable
    implementation("com.cimka:cimka-offline:1.1.1")
    }
  4. Add your config file at app/src/main/assets/cimka_config.json — see Configuration.

  5. Initialize in your Application class:

    MyApp.kt
    class MyApp : Application() {
    override fun onCreate() {
    super.onCreate()
    Cimka.initialize(this) // reads assets/cimka_config.json
    CimkaXml.register() // if you added cimka-xml
    CimkaOffline.register() // if you added cimka-offline
    }
    }

    cimka-compose needs no registration.

Consumer rules ship inside every AAR, so you don’t need to add rules for the SDK itself. To keep readable Activity names in your screen analytics for minified builds, add:

proguard-rules.pro
-keepnames class * extends android.app.Activity

Fragment names are already kept by cimka-xml.