Skip to main content

Add the SDK Dependency

Add the following dependency to your app-level build.gradle file
implementation("com.twinalyze:analytics:1+")
In your project-level build.gradle make sure the following plugins are configured:
plugins {
    id("com.android.application") version "8.2.0" apply false
    id("org.jetbrains.kotlin.android") version "1.9.10" apply false
}

Initializing Analytics SDK in Android

Initialize the SDK in your Application class to start tracking sessions, events, and insights.
class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        Analytics.getInstance().initialize(
            this,
            "YOUR_API_KEY",
            "YOUR_ORG_ID”,
            true
        )
    }
}

Parameter Reference

ParameterDescription
applicationAndroid application context
apiKeyYour Project API key
orgIdYour organization ID (e.g. twinalyze_demo_7356297484)
debugIf debug true than take a screenshot

Demo Account

Email: [email protected]
Password: 123
✅ Best Practice
Always call initialize() inside your Application class — not inside an Activity — to ensure complete session tracking.
class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        Analytics.initialize(
            this,
            "kh2RwGFsqNr1gh1NWWExAewbvIzYyNk",
            "twinalyze_demo_7356297484",
            true
        )
    }
}