Package-level declarations

This package provides helper classes to interact with android.car.

The package provides tools usable in different contexts:

Note: All of the tools are meant to operate under Android Automotive OS since version R (API 30), and will gracefully fail when running non-Automotive Android or with API levels below 30.

Types

Link copied to clipboard
class CarClient(context: Context, coroutineScope: CoroutineScope)

Safe client for the Car service.

Link copied to clipboard
@IviExperimental(reasons = [])
sealed class CarConnectionState

Represents the state of a connection to the Car service.

Link copied to clipboard
@IviExperimental(reasons = [])
object CarFlow

Safe client for the Car service, in form of a Flow.

Link copied to clipboard
@IviExperimental(reasons = [])
class FlowVhal(context: Context)

Experimental API for obtaining Android Car properties as Flows.

Link copied to clipboard
Link copied to clipboard

VhalWrapper implements basic handling of car properties from Android's Vehicle Hardware Abstraction Layer. Intended to be used in vehicle function service implementations.

Properties

Link copied to clipboard

Converts the VehicleAreaSeat to a dedicated SeatArea.

Link copied to clipboard

Converts the VehicleAreaWindow to a dedicated WindowArea.

Functions

Link copied to clipboard
@IviExperimental(reasons = [])
suspend fun Car.withDrivingStateManager(block: suspend CarDrivingStateManager.() -> Unit)

Run block with a valid CarDrivingStateManager.

Link copied to clipboard
@IviExperimental(reasons = [])
suspend fun Car?.withDrivingStateManagerIfAvailable(block: suspend CarDrivingStateManager.() -> Unit)

Run block with a valid CarDrivingStateManager.

Link copied to clipboard
@IviExperimental(reasons = [])
suspend fun Car.withPowerManager(block: suspend CarPowerManager.() -> Unit)

Run block with a valid CarPowerManager.

Link copied to clipboard
@IviExperimental(reasons = [])
suspend fun Car?.withPowerManagerIfAvailable(block: suspend CarPowerManager.() -> Unit)

Run block with a valid CarPowerManager.

Link copied to clipboard
@IviExperimental(reasons = [])
suspend fun Car.withPropertyManager(block: suspend CarPropertyManager.() -> Unit)

Run block with a valid CarPropertyManager.

Link copied to clipboard
@IviExperimental(reasons = [])
suspend fun Car?.withPropertyManagerIfAvailable(block: suspend CarPropertyManager.() -> Unit)

Run block with a valid CarPropertyManager.