init

expect fun init(config: TireTreadScanViewConfig, tireWidth: Int? = null, callback: TireTreadScanViewCallback? = null, onInitializationFailed: (Exception) -> Unit? = null)

Initialises the scanner with a config object and the tire width.

Parameters

config

the object defining scan properties.

tireWidth

the width of the tire.

callback

a callback for handling events during the scan process.

onInitializationFailed

a callback for handling initialization failure.


expect fun init(config: String, tireWidth: Int? = null, callback: TireTreadScanViewCallback? = null, onInitializationFailed: (Exception) -> Unit? = null)

Initialises the scanner with a JSON config and the tire width.

Parameters

config

the path to a JSON file containing the config or the config itself as string representation.

tireWidth

the width of the tire.

callback

a callback for handling events during the scan process.

onInitializationFailed

a callback for handling initialization failure.

actual fun init(config: TireTreadScanViewConfig, tireWidth: Int?, callback: TireTreadScanViewCallback?, onInitializationFailed: (Exception) -> Unit?)

Initialize.

Parameters

config

Measurement system to use.

tireWidth

the width of the tire.

callback

Config, use default config if null.

onInitializationFailed

Scan initialization event, default is null, will return an exception if failed


actual fun init(config: String, tireWidth: Int?, callback: TireTreadScanViewCallback?, onInitializationFailed: (Exception) -> Unit?)