install

fun install(activity: ComponentActivity, config: ScannerConfig = ScannerConfig(enabledRules = ScannerRules.allRuleIds().toSet()))

Attaches the accessibility scanner overlay to activity.

A default ScannerConfig that enables all built-in rules is used when config is omitted. Calling install for an activity that is already installed is a no-op.

Must be called on the main thread, typically in Activity.onCreate after setContent.

Parameters

activity

Activity that should receive the scanner overlay.

config

Scanner configuration applied to this install.

Throws

when the scanner is denied by the current build/toggle policy.


fun install(activity: ComponentActivity, destinationKeyProvider: () -> String?, config: ScannerConfig = ScannerConfig(enabledRules = ScannerRules.allRuleIds().toSet()))

Installs the scanner with an explicit key for single-host Compose navigation. Return the current route, pane, or other stable destination identifier from the provider.