TireTreadScanView

fun TireTreadScanView(config: TireTreadConfig = TireTreadConfig(), onScanAborted: (String?) -> Unit, onScanProcessCompleted: (String) -> Unit, callback: (ScanEvent) -> Unit?, onError: (String?, Exception) -> Unit)

Initializes the scan view with the configuration that was provided with config.

When the scan starts, events are being emitted through callback. If DefaultUI is disabled these events can be used to provide further information to the user (see ScanEvent)

Once the scan is finished and onScanProcessCompleted is invoked, your application should take back the control of the workflow and possibly continue to a result screen.

Parameters

config

configuration used to set up the scan process

onScanAborted

a callback that is invoked when the scan process is aborted

onScanProcessCompleted

a callback that is invoked once the scan process has finished.

callback

a callback that is invoked when a scan event was emitted

onError

a callback that is invoked when the scan process encountered an error


fun TireTreadScanView(config: String, onScanAborted: (String?) -> Unit, onScanProcessCompleted: (String) -> Unit, callback: (ScanEvent) -> Unit?, onError: (String?, Exception) -> Unit)

Initializes the scan view with the configuration in form of a JSON string that was provided with config.

When the scan starts, events are being emitted through callback. If DefaultUI is disabled these events can be used to provide further information to the user (see ScanEvent)

Once the scan is finished and onScanProcessCompleted is invoked, your application should take back the control of the workflow and possibly continue to a result screen.

Parameters

config

configuration used to set up the scan process.

onScanAborted

a callback that is invoked when the scan process is aborted.

onScanProcessCompleted

a callback that is invoked once the scan process has finished.

callback

a callback that is invoked when a scan event was emitted

onError

a callback that is invoked when the scan process encountered an error during initialization