Skip to content
Vehicle properties
Engine & powertrain

GEAR_SELECTION

What it is

Currently selected gear

This is the gear selected by the user.

{@code VehicleAreaConfig.HasSupportedValueInfo.hasSupportedValuesList} for the global area ID (0) must be {@code true}.

{@code getSupportedValuesList} for [GEAR_SELECTION, areaId=0] must return a {@code SupportedValuesListResult} that contains non-null {@code supportedValuesList}.

The supportedValues must represent the list of supported gears for this vehicle. For example, for an automatic transmission, the list can be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_PARK, GEAR_DRIVE, GEAR_1, GEAR_2,...} and for manual transmission it can be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_1, GEAR_2,...}.

In the case of an automatic transmission vehicle that allows the driver to select specific gears on demand (i.e. "manual mode"), GEAR_SELECTION's value must be set to the specific gear selected by the driver instead of simply GEAR_DRIVE.

For backward compatibility, config array for this property must be a list of values same as the supported values at boot-time.

How the ID is built

A property ID is a 32-bit value packing four fields. Reading 0x11400400 apart:

FieldMaskValueMeans
Group0xf00000000x10000000SYSTEM
Area0x0f0000000x01000000GLOBAL
Type0x00ff00000x00400000INT32
Ordinal0x0000ffff0x000004000x400

Reading it from an app

CarPropertyManager mgr = (CarPropertyManager)
        car.getCarManager(Car.PROPERTY_SERVICE);

int value =
        mgr.getIntProperty(VehiclePropertyIds.GEAR_SELECTION, 0);

This property is read-only — writes are rejected. It fires a callback whenever the value changes.