VehicleIgnitionState

public final class VehicleIgnitionState
extends Object

java.lang.Object
   ↳ android.car.VehicleIgnitionState


Possible states of a vehicle's ignition.

Applications can use CarPropertyManager.getProperty(int, int) with VehiclePropertyIds.IGNITION_STATE to query the vehicle's ignition state.

Summary

Constants

int ACC

Typically in this state accessories become available (e.g. radio).

int LOCK

Steering wheel is locked.

int OFF

Steering wheel is not locked, engine and all accessories are off.

int ON

Ignition is in state on.

int START

Typically in this state engine is starting (cranking).

int UNDEFINED

The vehicle's ignition state is undefined.

Public methods

static String toString(int ignitionState)

Gets a user-friendly representation of an ignition state.

Inherited methods

Constants

ACC

Added in API level 33
public static final int ACC

Typically in this state accessories become available (e.g. radio). Instrument cluster and engine are turned off

Constant Value: 3 (0x00000003)

LOCK

Added in API level 33
public static final int LOCK

Steering wheel is locked. If car can be in LOCK and OFF state at the same time than HAL must report LOCK state.

Constant Value: 1 (0x00000001)

OFF

Added in API level 33
public static final int OFF

Steering wheel is not locked, engine and all accessories are off. If car can be in LOCK and OFF state at the same time than HAL must report LOCK state.

Constant Value: 2 (0x00000002)

ON

Added in API level 33
public static final int ON

Ignition is in state on. Accessories and instrument cluster available, engine might be running or ready to be started.

Constant Value: 4 (0x00000004)

START

Added in API level 33
public static final int START

Typically in this state engine is starting (cranking).

Constant Value: 5 (0x00000005)

UNDEFINED

Added in API level 33
public static final int UNDEFINED

The vehicle's ignition state is undefined.

Constant Value: 0 (0x00000000)

Public methods

toString

Added in API level 33
public static String toString (int ignitionState)

Gets a user-friendly representation of an ignition state.

Parameters
ignitionState int: Value is UNDEFINED, LOCK, OFF, ACC, ON, or START

Returns
String