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 correlationId has to be a valid UUID otherwise the SDK will return an InvalidUUIDException in the initialization callback.

  • 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."
    },
    "howToScanTooltipConfig": {
      "visible": true,
      "text": "Alinhe o pneu com o overlay."
    },
    "tapToStartScanningTooltipConfig": {
      "visible": true,
      "text": "Toque na tela para iniciar o processo."
    },
    "tireOverlayConfig": {
      "visible": true
    },
    "uploadViewConfig": {
      "visible": true,
      "text": "Enviando imagens, aguarde."
    },
    "progressTimerConfig": {
      "visible": true
    },
    "lineProgressBarConfig": {
      "visible": true
    },
    "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()
}