Skip to main content

Get

Use getCurrentXxx to retrieve vehicle states and configuration values. Results are delivered asynchronously through onComplete(value) or onFailed. For obtaining a domain object, see Obtaining a domain object. For detailed API specifications, see API Reference.

The following example assumes that the Vehicle instance (vehicle) has already been initialized.

val door = vehicle.getDoor()
door.getCurrentDoorPosition(
area = DoorArea(DoorValue.ROW_1_LEFT),
onComplete = { pos: Int? ->
// do something
},
onFailed = { e: Exception ->
// do something
}
)

val display = vehicle.getDisplay()
display.getCurrentTemperatureDisplayUnit(
onComplete = { unit: TemperatureUnit? ->
// do something
},
onFailed = { e: Exception ->
// do something
}
)