Results

Obtaining the Measurement Results

After the upload of your scanned frames is completed, your measurement results may still take a few seconds to become available. To fetch the results, call the function getResult(measurementUUID):

  • Android

  • iOS

AnylineTireTread.getResult(measurementUUID = measurementUUID, timeoutSeconds = 60) { response ->
    when (response) {
        is SdkResult.Ok -> {
            // Handle success
            renderResult(response.result)
        }
        is SdkResult.Err -> {
            // Handle error
            showError(response.error)
        }
    }
}
AnylineTireTread.shared.getResult(measurementUUID: measurementUUID, timeoutSeconds: 60) { response in
    if let result = response.result {
        self.renderResult(result)
    } else if let error = response.error {
        self.showError(error)
    }
}

Data availability is only ensured for 24 hours after the measurement session is created.

The callback will return a successful response in form of an SdkResult.Ok object containing the result of the measurement.

In case of an error, the callback returns SdkResult.Err containing information about what went wrong during the result retrieval.

A timeoutSeconds parameter can be passed to the function, limiting how long the result fetching can run before it is interrupted (in case of bad network connection, etc.).

TreadDepthResult

The TreadDepthResult represents the result of a tread depth measurement. It contains the following properties:

  • global: An instance of TreadResultRegion representing the global result.

    • This value represents the global tread depth of the entire tire.

    • This value is calculated from all individual measurements.

  • regions: A list of TreadResultRegion instances representing the results for each of the identified tire regions.

    • This value represents the tread depth of the identified tire regions. It does not represent measurements of single grooves.

    • The regions are always provided considering the direction from Left to Right side of the scanned tire.

  • minimumValue: An instance of TreadResultRegion with the minimum value among the available regions, or the global value in case no regional results are available.

  • measurementInfo: An instance of MeasurementInfo providing additional information about the measurement.

    • This property holds the measurement UUID, the measurement’s status (MeasurementStatus) and - if provided before the scan process - the additionalContext of your measurement.

    • The results are only available when the measurement’s status is ResultReady, ResultAndReportReady, or Completed.

  • measurementMetadata: An instance of MeasurementMetadata containing metadata about the measurement process (optional, may be null).

    • Contains the movementDirection property that indicates the device movement direction during scanning (this property itself may also be null if the direction could not be detected).

    • This metadata helps understand the scanning orientation and can be useful for result interpretation.

MeasurementStatus

The measurementInfo.status property uses the following MeasurementStatus values:

Status Meaning

WaitingForImages

The measurement session exists, but the backend is still waiting for scan frames.

Processing

Frames were uploaded and the backend is still processing the measurement.

ResultReady

The tread depth result is ready to be retrieved.

ResultAndReportReady

The tread depth result and report data are ready to be retrieved.

Completed

Processing is fully complete.

Aborted

The scan session was aborted before completion.

Failed

The measurement could not be completed successfully.

Unknown

The SDK could not determine the current measurement status.

MovementDirection

When measurementMetadata is present, movementDirection may contain one of the following MovementDirection values:

Direction Meaning

Unknown

The SDK could not determine the scan direction.

LeftToRight

The device moved from the left side of the tire to the right side.

RightToLeft

The device moved from the right side of the tire to the left side.

Error Codes

When calling getResult(), you may receive an SdkResult.Err instead of a successful response.

For the canonical list of result-retrieval errors and what to do next, see Error Handling.

User Corrected Values and Comments

All feedback methods return SdkResult, so failed requests surface through SdkResult.Err. For the canonical error handling guidance, see Error Handling.

User Comments

To send a comment on a measurement, use the sendCommentFeedback function of AnylineTireTread.

As usual with the Tire Tread SDK, the measurement UUID for the scan must be passed as a parameter. The comment is passed as a string:

  • Android

  • iOS

AnylineTireTread.sendCommentFeedback(measurementUUID = measurementUUID, comment = "Scan looked good") { response ->
    when (response) {
        is SdkResult.Ok -> {
            // Handle success
        }
        is SdkResult.Err -> {
            // Handle error
        }
    }
}
AnylineTireTread.shared.sendCommentFeedback(measurementUUID: measurementUUID, comment: "Scan looked good") { response in
    if let result = response.result {
        // Handle success
        _ = result
    } else if let error = response.error {
        // Handle error
        print(error)
    }
}

Tire ID

To send your own tire identifier with a measurement, use the sendTireIdFeedback function:

  • Android

  • iOS

AnylineTireTread.sendTireIdFeedback(measurementUUID = measurementUUID, tireId = "TIRE-123") { response ->
    when (response) {
        is SdkResult.Ok -> {
            // Handle success
        }
        is SdkResult.Err -> {
            // Handle error
        }
    }
}
AnylineTireTread.shared.sendTireIdFeedback(measurementUUID: measurementUUID, tireId: "TIRE-123") { response in
    if let result = response.result {
        // Handle success
        _ = result
    } else if let error = response.error {
        // Handle error
        print(error)
    }
}

User-Corrected Regional Values

To send user-corrected regional values, use the sendTreadDepthResultFeedback function from AnylineTireTread. The result feedback should be provided as a list of TreadResultRegion, ordered from left to right.

You can only provide feedback for the regions returned by the SDK in the TreadDepthResult object.

The values of all regions need to be added to the list before sending the feedback.

The TreadResultRegion objects can be initialized with millimeter, inch, or inch32nds units:

  • Android

  • iOS

val myCorrectedResults = listOf(
    TreadResultRegion.initMm(true, 0.8),
    TreadResultRegion.initInch(true, 0.031496),
    TreadResultRegion.initInch32nds(true, 1)
)

AnylineTireTread.sendTreadDepthResultFeedback(
    measurementUUID = measurementUUID,
    treadResultRegions = myCorrectedResults,
) { response ->
    when (response) {
        is SdkResult.Ok -> {
            // Handle success
        }
        is SdkResult.Err -> {
            // Handle error
        }
    }
}
let myCorrectedResults = [
    TreadResultRegion.companion.doInitMm(isAvailable: true, value: 0.8),
    TreadResultRegion.companion.doInitInch(isAvailable: true, value: 0.031496),
    TreadResultRegion.companion.doInitInch32nds(isAvailable: true, value: 1)
]

AnylineTireTread.shared.sendTreadDepthResultFeedback(
    measurementUUID: measurementUUID,
    treadResultRegions: myCorrectedResults
) { response in
    if let result = response.result {
        // Handle success
        _ = result
    } else if let error = response.error {
        // Handle error
        print(error)
    }
}