Stay organized with collections
Save and categorize content based on your preferences.
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 |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
ACC
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
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
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.
If VehiclePropertyIds.IGNITION_STATE
is implemented on a BEV, then
this state communicates the BEV's High Voltage battery is disconnected and thus the vehicle
is OFF.
Constant Value:
2
(0x00000002)
ON
public static final int ON
Ignition is in state on. Accessories and instrument cluster available, engine might be
running or ready to be started.
If VehiclePropertyIds.IGNITION_STATE
is implemented on a BEV, then
this state communicates the BEV's High Voltage battery is connected and thus the vehicle is
ON.
Constant Value:
4
(0x00000004)
START
public static final int START
Typically in this state engine is starting (cranking).
Constant Value:
5
(0x00000005)
UNDEFINED
public static final int UNDEFINED
The vehicle's ignition state is undefined.
Constant Value:
0
(0x00000000)
Public methods
toString
public static String toString (int ignitionState)
Gets a user-friendly representation of an ignition state.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-17 UTC.
[null,null,["Last updated 2025-02-17 UTC."],[],[],null,["# VehicleIgnitionState\n\nSummary: [Constants](#constants) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nVehicleIgnitionState\n====================\n\n\n`\npublic\n\nfinal\n\nclass\nVehicleIgnitionState\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|----------------------------------|\n| java.lang.Object ||\n| ↳ | android.car.VehicleIgnitionState |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nPossible states of a vehicle's ignition.\n\nApplications can use [CarPropertyManager.getProperty(int, int)](/reference/android/car/hardware/property/CarPropertyManager#getProperty(int,%20int)) with [VehiclePropertyIds.IGNITION_STATE](/reference/android/car/VehiclePropertyIds#IGNITION_STATE) to query the vehicle's ignition\nstate.\n\nSummary\n-------\n\n| ### Constants ||\n|-------|---------------------------------------------------------------------------------------------------------------------------|\n| `int` | [ACC](/reference/android/car/VehicleIgnitionState#ACC) Typically in this state accessories become available (e.g. radio). |\n| `int` | [LOCK](/reference/android/car/VehicleIgnitionState#LOCK) Steering wheel is locked. |\n| `int` | [OFF](/reference/android/car/VehicleIgnitionState#OFF) Steering wheel is not locked, engine and all accessories are off. |\n| `int` | [ON](/reference/android/car/VehicleIgnitionState#ON) Ignition is in state on. |\n| `int` | [START](/reference/android/car/VehicleIgnitionState#START) Typically in this state engine is starting (cranking). |\n| `int` | [UNDEFINED](/reference/android/car/VehicleIgnitionState#UNDEFINED) The vehicle's ignition state is undefined. |\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static String` | ` `[toString](/reference/android/car/VehicleIgnitionState#toString(int))`(int ignitionState) ` Gets a user-friendly representation of an ignition state. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nConstants\n---------\n\n### ACC\n\n```\npublic static final int ACC\n```\n\nTypically in this state accessories become available (e.g. radio). Instrument cluster and\nengine are turned off\n\n\u003cbr /\u003e\n\nConstant Value:\n\n3\n(0x00000003)\n\n\n### LOCK\n\n```\npublic static final int LOCK\n```\n\nSteering wheel is locked. If car can be in `LOCK` and `OFF` state at the same\ntime than HAL must report `LOCK` state.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n1\n(0x00000001)\n\n\n### OFF\n\n```\npublic static final int OFF\n```\n\nSteering 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.\n\nIf [VehiclePropertyIds.IGNITION_STATE](/reference/android/car/VehiclePropertyIds#IGNITION_STATE) is implemented on a BEV, then\nthis state communicates the BEV's High Voltage battery is disconnected and thus the vehicle\nis OFF.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n2\n(0x00000002)\n\n\n### ON\n\n```\npublic static final int ON\n```\n\nIgnition is in state on. Accessories and instrument cluster available, engine might be\nrunning or ready to be started.\n\nIf [VehiclePropertyIds.IGNITION_STATE](/reference/android/car/VehiclePropertyIds#IGNITION_STATE) is implemented on a BEV, then\nthis state communicates the BEV's High Voltage battery is connected and thus the vehicle is\nON.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n4\n(0x00000004)\n\n\n### START\n\n```\npublic static final int START\n```\n\nTypically in this state engine is starting (cranking).\n\n\u003cbr /\u003e\n\nConstant Value:\n\n5\n(0x00000005)\n\n\n### UNDEFINED\n\n```\npublic static final int UNDEFINED\n```\n\nThe vehicle's ignition state is undefined.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n0\n(0x00000000)\n\n\nPublic methods\n--------------\n\n### toString\n\n```\npublic static String toString (int ignitionState)\n```\n\nGets a user-friendly representation of an ignition state.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ignitionState` | `int`: Value is [UNDEFINED](/reference/android/car/VehicleIgnitionState#UNDEFINED), [LOCK](/reference/android/car/VehicleIgnitionState#LOCK), [OFF](/reference/android/car/VehicleIgnitionState#OFF), [ACC](/reference/android/car/VehicleIgnitionState#ACC), [ON](/reference/android/car/VehicleIgnitionState#ON), or [START](/reference/android/car/VehicleIgnitionState#START) \u003cbr /\u003e |\n\n| Returns ||\n|----------|--------|\n| `String` | \u003cbr /\u003e |"]]