SDK setup for Android apps
This guide shows the steps to set up the Kotzilla SDK in your Android app.
Before starting, your application must be registered on the Kotzilla Platform:
- Using the Koin IDE Plugin inside Android Studio or IntelliJ IDEA, or
- Via the Kotzilla Console for a web-based onboarding experience.
Once your app is registered and the type is selected, follow the steps below to integrate the SDK, capture analytics, and start debugging and monitoring your app.
Step 1 - Setup Kotzilla SDK (Android)
1.1 Kotzilla project configuration file
Download the kotzilla.json
configuration file for your app module and place it in the following directory:
Module (app module) Gradle file: <project>/<app-module>
This file contains your API key, version, and SDK configuration for shared code.
1.2 Set up the SDK
The instructions below use Version Catalog configuration by default.
If your project uses the traditional Gradle setup, please check the documentation here for specific instructions.
Kotzilla SDK is available on both Maven Central and the Kotzilla public repository. More information on how to configure access to the Kotzilla repository is available here
Add the following lines to your libs.versions.toml
file:
[versions]
kotzilla = "1.2.2" // Check the latest version available below
[libraries]
kotzilla-sdk = { group = "io.kotzilla", name = "kotzilla-sdk", version.ref = "kotzilla" }
# If needed for Ktor 3:
# kotzilla-sdk-ktor3 = { group = "io.kotzilla", name = "kotzilla-sdk-ktor3", version.ref = "kotzilla" }
[plugins]
kotzilla = { id = "io.kotzilla.kotzilla-plugin", version.ref = "kotzilla" }
Set up the Kotzilla Plugin in your project root-level Gradle file (<project>/build.gradle.kts
):
plugins {
alias(libs.plugins.kotzilla) apply false
}
In your app module Gradle file (<project>/<app-module>/build.gradle.kts
), add:
plugins {
alias(libs.plugins.kotzilla)
}
dependencies {
implementation(libs.kotzilla.sdk)
// If using Ktor 3:
// implementation(libs.kotzilla.sdk.ktor3)
}
- implementation(libs.kotzilla.sdk) is the core Kotzilla SDK, required for analytics and other features.
- If your project uses Ktor 3, uncomment the second line to include the Ktor 3 compatible SDK.
1.3 Sync Gradle
Sync your project in Android Studio or IntelliJ IDEA to apply the changes.
Step 2 - Start Kotzilla SDK (Android)
Initialize the Kotzilla SDK in your app’s main Application class to start capturing analytics data:
import io.kotzilla.sdk.analytics.koin.analytics
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
startKoin {
androidContext(this@MyApplication)
analytics()
}
}
}
Step 3 - Go To Dashboard
Now that the SDK is configured, you can build and run your app to start capturing data from a first user session.
Once you've stopped the app:
- Click Check your data to confirm everything is being collected correctly.
- Then click Go to Dashboard to view your app’s performance and configuration insights.