Add the dependencies
// gradle.properties — see github.com/scriptx-com/traceitx-releases
traceitxVersion=<latest>
// build.gradle
implementation("com.traceitx:core:$traceitxVersion")
implementation("com.traceitx:reporter-ui:$traceitxVersion")
implementation("com.traceitx:media3:$traceitxVersion") // optional — Session Vitals playback tracking
All three resolve from Maven Central. core and reporter-ui are required; media3 is optional. core alone
compiles, and then throws the moment the reporter opens: TraceItX.report.open()
resolves through a resolver that reporter-ui installs via an androidx.startup
Initializer, and without it you get
IllegalStateException("Reporter UI module not on classpath. Add com.traceitx:reporter-ui dependency.").
A snippet listing only core ships a crash.
Start it
Once, as early as you can — Application.onCreate():
import com.traceitx.TraceItX
import com.traceitx.config.TraceItXConfig
class MyApp : Application() {
override fun onCreate() {
super.onCreate()
TraceItX.start(this, TraceItXConfig(appId = "txx_app_…", sdkKey = "txx_live_…"))
}
}
Android takes both an appId and an sdkKey, and the config class is in
com.traceitx.config — not alongside the TraceItX object. start() throws
TraceItXConfigError if either is blank — the one exception start() lets
out, so let it escape rather than catching it.
Pass the current Activity as the optional third argument if you start from
somewhere other than Application — the SDK hooks each Activity’s window as it
is created, so without it the Activity already on screen never records tap
breadcrumbs.
Open the reporter
The SDK draws no trigger of its own — wire it to your own button or debug menu.
report.open() is a suspend function that returns when the user submits or
cancels:
lifecycleScope.launch {
val result = TraceItX.report.open()
}
TraceItX.report.openAsync(callback) is the callback form. The bubble config
flag is only a hint your own code can read — see
Configuration.
Requirements
| minSdk | 24 |
| Kotlin | 2.0+ — the SDK is built with Kotlin 2.1 |
| UI | Jetpack Compose and classic Views both supported |
| TV | Android TV and Fire TV. There is no on-device reporter on a TV; the app runs in companion mode — see Android TV. |
Verify it
File a report and check the delivery log in the dashboard. If nothing arrives,
check captureGate, which reports whether capture is armed — start() opens
it, kill() closes it:
Log.d("traceitx", "gate=${TraceItX.captureGate} config=${TraceItX.currentConfig}")
The usual causes are a wrong appId/sdkKey pair and reporter-ui missing
from the dependency list.
Next
- Configuration — every option
- Console & network — network capture needs the OkHttp interceptor
- Screen tracking — Activities are automatic, Compose is not
- Sensitive content — mask before capture