Skip to main content

BleAction

Enum Class: BleAction

Represents action that can be instructed to peripheral. Send one with BleTerminal.sendAction().

Available Actions​

LOCK​

LOCK

Send lock action to terminal

UNLOCK​

UNLOCK

Send unlock action to terminal

UNLOCK_NOKEYFOB​

UNLOCK_NOKEYFOB

Send unlock with no key fob action to terminal: the vehicle is unlocked without activating the key fob, so the driver cannot start the engine

HEADLIGHT​

HEADLIGHT

Send headlight action to terminal

HORN​

HORN

Send horn action to terminal

GET_LOCK_STATE​

GET_LOCK_STATE

Refresh the vehicle's lock state. The result arrives in BleListener.onTerminalCommandResult(GET_LOCK_STATE); read the state with BleTerminal.getLockState(): LOCKED, UNLOCKED or UNKNOWN. The SDK also sends this action itself right after connecting.

VEHICLE_GET_CONFIG​

VEHICLE_GET_CONFIG

Get the vehicle statistics (odometer, fuel, doors, lights...), delivered as GetVehicleStats through BleListener.onTerminalDidGetVehicleStats

VEHICLE_GET_STATUS​

VEHICLE_GET_STATUS

Get the current state of the vehicle's ignition, on or off, delivered as GetVehicleStatus through BleListener.onTerminalDidGetVehicleStatus

Results​

ActionResult callback
LOCK, UNLOCKBleListener.onTerminalCommandResult(action), called once the SDK has read the new lock state, so BleTerminal.getLockState() is up to date inside the callback
UNLOCK_NOKEYFOB, HEADLIGHT, HORN, GET_LOCK_STATEBleListener.onTerminalCommandResult(action)
VEHICLE_GET_CONFIGBleListener.onTerminalDidGetVehicleStats(command, getVehicleStats)
VEHICLE_GET_STATUSBleListener.onTerminalDidGetVehicleStatus(command, getVehicleStatus)

Failures arrive in BleListener.onError; see Send actions in the integration guide.

Functions​

valueOf(value: String): BleAction​

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws IllegalArgumentException if this enum type has no constant with the specified name

values(): Array<BleAction>​

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

Action Categories​

Control Actions​

  • LOCK - Lock the vehicle doors
  • UNLOCK - Unlock the vehicle doors
  • UNLOCK_NOKEYFOB - Unlock without activating the key fob: the driver cannot start the engine

Signaling Actions​

  • HEADLIGHT - Flash vehicle headlights
  • HORN - Sound vehicle horn

Status Actions​

  • GET_LOCK_STATE - Refresh the lock state
  • VEHICLE_GET_CONFIG - Get the vehicle statistics
  • VEHICLE_GET_STATUS - Get the ignition state

See Also​