Connecting with other Anyline scans
To connect your scans with one of our other Anyline capabilities you can pass a correlationId
with the additionalContext
either via a JSON configuration file or in code.
The |
-
JSON
-
Android
-
iOS
{
"useDefaultUi": true,
"useDefaultHaptic": true,
"defaultUiConfig": {
"distanceIndicatorConfig": {
"visible": true,
"textOk": "Mantenha a distância.",
"textMoveCloser": "Chegue mais perto.",
"textMoveAway": "Aumente a distância."
},
"focusPointTooltipConfig": {
"visible": true,
"text": "Mova o dispositivo para frente e para trás para detectar o pneu."
},
"tapToStartScanningTooltipConfig": {
"visible": true,
"text": "Toque na tela para iniciar o processo."
},
"tireOverlayConfig": {
"visible": true
},
"uploadViewConfig": {
"visible": true,
"text": "Enviando imagens, aguarde."
},
"orientationWarningConfig": {
"visible": true,
"text": "Please rotate the phone to landscape mode"
}
},
"scanSpeed": "Fast",
"measurementSystem": "Metric",
"additionalContext": {
"tirePosition": {
"axle": 1,
"side": "Left",
"positionOnAxle": 1
},
"correlationId": "00000000-0000-0000-0000-000000000000"
}
}
@Composable
fun TireTreadScanViewWithTireTreadScanViewConfig() {
// Define the values for your config
val tireTreadScanViewConfig = TireTreadScanViewConfig().apply {
additionalContext = AdditionalContext().apply {
correlationId = "00000000-0000-0000-0000-000000000000"
}
}
// Invoke the TireTreadScanView composable with the TireTreadScanViewConfig above
TireTreadScanView(context = this,
config = tireTreadScanViewConfig,
callback = object : TireTreadScanViewCallback {
// override callbacks for events needed during your scans
}) {
// handle initialisation error
}
}
private func setupTireTreadScanView() {
let config = TireTreadScanViewConfig()
let additionalContext = AdditionalContext()
// set correlation ID
additionalContext.correlationId = "00000000-0000-0000-0000-000000000000"
config.additionalContext = additionalContext
TireTreadScanViewKt.TireTreadScanView(context: UIViewController(), config: config, callback: self) { [weak self] error in
// handle initialisation error
}
self.dismissViewController = { [weak self] in
self?.navigationController?.popViewController(animated: true)
}
addScanViewControllerAsChild()
}