Skip to content
TraceItX Docs
Documentation

Configuration

One config object passed to start(). Everything the Android SDK accepts.

Updated

import com.traceitx.TraceItX
import com.traceitx.config.TraceItXConfig
import com.traceitx.config.CaptureConfig

TraceItX.start(
    context,
    TraceItXConfig(
        appId = "txx_app_…",
        sdkKey = "txx_live_…",
        release = "2.4.0",
        capture = CaptureConfig(network = true),
    ),
)

Note the import: the config lives in com.traceitx.config, not alongside the TraceItX object.

TraceItXConfig

FieldTypeDefaultWhat it does
appIdStringRequired. Your app’s id. Blank throws TraceItXConfigError from start().
sdkKeyStringRequired. Your SDK key. Android takes both, unlike iOS.
environmentEnvironmentproductiondevelopment, staging or production.
releaseString?nullRelease identifier recorded on the report.
captureCaptureConfigdefaultsWhat is captured — see below.
bubbleBooleantrueA hint your own code can read, nothing more. The SDK does not install a bubble — trigger UI is yours.
useDynamicColorBooleanfalseNot read. The reporter never applies Material You colours; theme it with theme instead.
companionDeviceIdString?nullAn MDM id or serial you already trust, hashed on the device before it is sent.
companionBadgeEnabledBooleantrueShow the companion pairing badge on TV.
companionBadgePositionString?nullbottom-right, bottom-left, top-right, top-left. Anything else falls back to bottom-right.
themeReporterThemeOptions?nullReporter colours. See Branding.
installIdentifierEnabledBooleantrueSend a per-install identifier so distinct installs count toward your plan. Nothing about the person is derived from it. false turns it off locally; it can never force it on.
vitalsVitalsConfigVitalsConfig()Session Vitals opt-out / sample rate / source-query capture. See Session vitals.

bubble is easy to misread: it does not make the SDK draw anything. It is a flag your own code can inspect to decide whether to render a floating trigger, kept so a host can carry that preference in config rather than beside it.

CaptureConfig

FieldDefaultWhat it does
screenshottrueNot read. The reporter always takes a screenshot.
focustrueNot read. Focused-component capture is not implemented on Android.
logstrueCapture Timber output and anything written to System.out / System.err. Plain android.util.Log calls are not captured.
networkfalseGates body capture only. Request metadata is recorded whenever the OkHttp interceptor is attached — see Console & network.
crashtrueUncaught exceptions become unattended reports.
ringBufferCapacity250Not read — the log and network buffers are each fixed at 100 entries. Setting it has no effect.
networkBodiestrueClient veto for body capture. false always wins; true does not force capture on — the server gate still decides.

Body capture is effective only when network is true, networkBodies is not false, and the server has it on: a client can turn it off and can never turn it on. See Network bodies and Server config.

Runtime methods

MethodWhat it does
report.open()suspend. Opens the reporter, returns on submit or cancel. openAsync(callback) for a callback form.
report.isPresentingStateFlow<Boolean> — true while the reporter is up. Use it to disable your trigger.
setUser(user)Attach or clear the end user. null clears. No-op before start(). See Identity.
setIdentityToken(source)Supply a verified identity instead of a self-asserted one. null signs out.
addBreadcrumb(message, kind, level, data)Add a custom entry to the trail.
recordScreen(name, data)Mark a screen transition. See Screen tracking.
setExtra(value) / clearExtra()Free-form string attached to the next report, then cleared. Each call replaces the last.
markSensitive(view)Mask a view. See Sensitive content.
startCompanion() / stopCompanion()Companion mode for TV apps. See Android TV.
kill()Stop the SDK and drop buffered evidence for this session.
requestOutboxDrain()Flush the outbox now rather than on its own schedule.

kill() is the switch for a user withdrawing consent mid-session: it stops capture and discards what is already buffered, which is the distinction that matters if the reason for calling it is that something sensitive just appeared.

Reading current state

TraceItX.captureGate              // Boolean — is capture actually allowed?
TraceItX.currentConfig            // TraceItXConfig?
TraceItX.currentUser              // TXUser?
TraceItX.captureUserSnapshot()    // TXCapturedUser
TraceItX.captureSessionSnapshot()

captureGate reports whether capture is armed — start() opens it and kill() closes it. It is not a summary of the server feature gates: replay and body capture have their own, so captureGate can be true while neither is running.

What Android does not have

No debug, disabled or onError field. No setMetadata — use setExtra. No client-side redaction config: redaction is not configurable from TraceItXConfig on this SDK. No sessionReplay block — replay is enabled entirely from the server.

Two-way replies are not implemented in the Android SDK. The server block is decoded for compatibility, but there is no reply UI and no polling; the feature is web-only today.

To keep TraceItX out of a build, do not call start.