CarClimate


@RequiresCarApi(value = 5)
@MainThread
@ExperimentalCarApi
interface CarClimate


Manages access to car climate system such as cabin temperatures, fan speeds and fan directions.

Summary

Public functions

Unit
fetchClimateProfile(
    executor: Executor,
    request: ClimateProfileRequest,
    callback: CarClimateProfileCallback
)

Fetches the climate profile information of the associated features specified in the request, for example, HVAC features like Fan Speed, Cabin Temperature, etc.

Unit
registerClimateStateCallback(
    executor: Executor,
    request: RegisterClimateStateRequest,
    callback: CarClimateStateCallback
)

Registers an ongoing listener to receive car climate state events from the car hardware such as when the driver side temperature is increased/decreased.

Unit
<E> setClimateState(
    executor: Executor,
    request: ClimateStateRequest<E!>,
    callback: CarSetOperationStatusCallback
)

Sets values for the car climate system.

Unit

Unregisters the ongoing listener for receiving car climate state events.

Public functions

fetchClimateProfile

Added in 1.3.0
fun fetchClimateProfile(
    executor: Executor,
    request: ClimateProfileRequest,
    callback: CarClimateProfileCallback
): Unit

Fetches the climate profile information of the associated features specified in the request, for example, HVAC features like Fan Speed, Cabin Temperature, etc.

Parameters
executor: Executor

the executor which will be used for invoking the listener

request: ClimateProfileRequest

the ClimateProfileRequest indicates profile features which the caller is interested in

callback: CarClimateProfileCallback

the CarClimateProfileCallback that will be invoked when the data is available

registerClimateStateCallback

Added in 1.3.0
fun registerClimateStateCallback(
    executor: Executor,
    request: RegisterClimateStateRequest,
    callback: CarClimateStateCallback
): Unit

Registers an ongoing listener to receive car climate state events from the car hardware such as when the driver side temperature is increased/decreased.

If the callback was registered previously then it won't be registered again.

Parameters
executor: Executor

the executor which will be used for invoking the listener

request: RegisterClimateStateRequest

the RegisterClimateStateRequest indicates climate features which the caller is interested in

callback: CarClimateStateCallback

the CarClimateStateCallback that will be invoked when the car climate is changed

setClimateState

Added in 1.3.0
fun <E> setClimateState(
    executor: Executor,
    request: ClimateStateRequest<E!>,
    callback: CarSetOperationStatusCallback
): Unit

Sets values for the car climate system.

Parameters
<E>

the data type for ClimateStateRequest

executor: Executor

the executor which will be used for invoking the listener

request: ClimateStateRequest<E!>

the ClimateStateRequest indicates climate features which the caller is setting value for

callback: CarSetOperationStatusCallback

the CarSetOperationStatusCallback that will be invoked when the set operation succeeded or failed

unregisterClimateStateCallback

Added in 1.3.0
fun unregisterClimateStateCallback(callback: CarClimateStateCallback): Unit

Unregisters the ongoing listener for receiving car climate state events.

If the callback is not currently registered, then this method call has no impact.

Parameters
callback: CarClimateStateCallback

the callback to unregister