i99dash docs
API referencei99dashTypes

VEHICLE_CAPABILITIES

The closed enum of vehicle / hardware capabilities every mini-app declares + every host emits. Bit positions are frozen across SDK + Dart + Kotlin + Python.

The canonical list of capability strings — the union of every hardware feature a mini-app might depend on, mirrored across all four languages of the platform (TypeScript SDK, Dart host UI, Kotlin host native, Python backend).

Why an array, not an enum?

The list is order-sensitive: each entry's index is its bit position in the packed capabilityBits integer. Reordering the array would silently change the meaning of every bitmask currently persisted in:

  • The backend's vehicle_capabilities.capability_bits BIGINT column
  • Every cached host snapshot

A CI drift check (scripts/check-capability-drift.mjs) fails the SDK PR if the four mirrors disagree on order or content.

The list

BitStringMeaningDefault state
0display.readEnumerate displays via display.list + receive hot-plug events.All BYD trims.
1pkg.readEnumerate installed packages via pkg.list.All BYD trims.
2pkg.launch.iviLaunch a package on the IVI (default) display.All trims.
3pkg.launch.passengerLaunch a package on the passenger panel. Routed via am start --display N on Di5.1, via DiShare cast on Di5.0.Di5.1 trims (L8, L5L); Di5.0 trims via DiShare.
4pkg.launch.cluster.pixelLaunch a package on the instrument cluster with full pixel control.L8, L5L only.
5pkg.launch.cluster.iconsToggle cluster icons / themes via the MCU mux (IAutoContainer.sendInfo) — no pixel control.L5 family (L5, L5U, L5L).
6pkg.launch.dishareUse BYD's DiShare mirror chain to cast to the passenger panel.Di5.0 trims (L5, L5U) where direct am start --display N is silently dropped.
7surface.write.iviRender a host-managed WebView surface on the IVI.All trims.
8surface.write.passengerSame on the passenger panel. Not included in DiShare cars (DiShare casts an existing activity, can't host the WebView surface).Di5.1 trims with showFission2.
9surface.write.clusterRender on the cluster (paired with pkg.launch.cluster.pixel).L8, L5L only.
10cursor.writeInject a synthetic cursor on a non-default display. Requires the host's a11y bridge.All trims (a11y granted by AdbBootstrap).
11gesture.dispatchDispatch synthetic taps / swipes / long-presses via the a11y bridge.All trims.
12ac.getRead AC state (power, fan, temperature, mode).All BYD trims (every trim ships byd_airconditioning).
13ac.setWrite AC state.All BYD trims.
14door.setLock / unlock / open doors.All BYD trims.
15window.setMove power windows.All BYD trims.

Bit position is VEHICLE_CAPABILITIES.indexOf(cap) — the SDK helper bitsFromCapabilities does the conversion for you.

Adding a new capability

The list is append-only. To add a new capability:

  1. Append the string to VEHICLE_CAPABILITIES in src/types/vehicle-capabilities.ts (this SDK).
  2. Append the same string to all three mirror files:
    • car-i99dash/lib/core/car/vehicle_capability.dart
    • car-i99dash/android/.../car/VehicleCapability.kt
    • backend-i99dash/app/domain/vehicle_capabilities/constants.py
  3. Run node scripts/check-capability-drift.mjs — it'll reject the PR if any mirror is missing or out of order.
  4. Update the relevant per-trim entry in the static seed (CarProfileSeed.kt) when applicable.
  5. Bump the SDK minor version.

Removing or renaming a capability is not supported — every persisted bitmask carries the historical position. If a feature truly disappears, leave the slot reserved with a deprecated marker in the source comment and stop seeding it.

Bit-budget headroom

Bits 0–30 are usable on the SDK wire (JS bitwise ops are signed 32-bit). The host stores the bitmask as a Java Long (64-bit) and the backend as BIGINT, so the bottleneck is the SDK. We're at 16 of 31 today. When you cross 25, plan the wire migration to a length-prefixed bit string before you cross 31.

Type signature

Prop

Type

Source

On this page