Kotlin / Android SDK

run.traceiq:traceiq for JVM servers and Android (API 21+). No third-party dependencies. On Android, add the INTERNET permission.

It is not on Maven Central yet. Until then, build it into your local Maven repository from a clone of the TraceIQ repository (cd sdks/kotlin && gradle publishToMavenLocal), then add mavenLocal() to your repositories and:

kotlin
implementation("run.traceiq:traceiq:0.1.0")
kotlin
import com.traceiq.TraceIQ
import com.traceiq.TraceIQConfig

val traceiq = TraceIQ(TraceIQConfig(
  projectId = "YOUR_PROJECT_ID",
  writeKey = "YOUR_WRITE_KEY",
  endpoint = "https://api.traceiq.run",
))

traceiq.identify("user_123", traits = mapOf("kyc_tier" to 2))
traceiq.capture("transfer_started", userId = "user_123",
                properties = mapOf("amount" to 5000, "currency" to "NGN"))