Touch Input

Capture app-local Android touch input and guard capture by app state.

The Android runtime captures touch input when touchCapture is configured and the runtime is active.

Configure

val options = AnsightOptions.createBuilder()
    .withTouchCapture(
        moveCaptureDistanceThreshold = 8.0,
        moveCaptureFramesPerSecond = 20,
    )
    .build()

Disable it:

val options = AnsightOptions.createBuilder()
    .withoutTouchCapture()
    .build()

Runtime Toggle

AnsightRuntime.enableTouchCapture()
AnsightRuntime.disableTouchCapture()

Guard Capture

Android exposes a runtime touch guard:

Ansight.setTouchCaptureGuard {
    sessionManager.isDebugSessionAllowed
}

The guard is evaluated before captured touch records are accepted.

Touch records include action, pointer data, surface coordinates, normalized coordinates when available, and capture time. Keep touch capture scoped to approved local development or QA workflows.