Advanced configurations

Maximum number of vehicles

A user can declare one or more vehicles. If you need to limit the number of configurable vehicle(s), you can set the parameter maxVehicles:

val maxVehicles = 1
DriveKitVehicleUI.configureMaxVehicles(maxVehicles)

Settings:

  • A strictly positive integer

  • null: If you do not want to limit the number of configurable vehicles.

Default value: null

Authorization to add a vehicle

In some cases the vehicle can be pre-configured or you do not want the user to add a vehicle himself. Depending on your needs, it is possible to allow or restrict the vehicle to be added by the user. Call the following method to enable/disable the configuration:

val canAddVehicle = true
DriveKitVehicleUI.enableAddVehicle(canAddVehicle)

Settings:

  • true: the user can add a vehicle

  • false: the user cannot add a vehicle

Default value: true

Configure vehicle actions

The Vehicle UI module lets you manage the actions that can be performed by the user on the vehicle.

You can select the features that are visible and accessible to the user as well as the order in which these features are displayed. The possible actions are : delete the vehicle, replace the vehicle, rename the vehicle, technical data display and manage the vehicle mileage.

You can select which actions you want to display by calling the following method:

DriveKitVehicleUI.configureVehicleActions(
    listOf(VehicleAction.SHOW, VehicleAction.RENAME, VehicleAction.REPLACE, VehicleAction.DELETE, VehicleAction.ODOMETER)
)

Settings:

  • SHOW: the user can display the vehicle characteristics.

  • RENAME: the user can rename the vehicle.

  • REPLACE: the user can replace the vehicle.

  • DELETE: the user can delete the vehicle.

  • ODOMETER: the user can enter a mileage value manually.

Default values: [SHOW, RENAME, REPLACE, DELETE, ODOMETER]

Authorization to delete a beacon

If automatic trip recording with a beacon is mandatory in your application, you can block the deletion of a beacon and only allow its replacement. You can enable or disable this function using the following method:

val canRemoveBeacon = true
DriveKitVehicleUI.enableRemoveBeacon(canRemoveBeacon)

Settings:

  • true: the user can delete a beacon

  • false: the user cannot delete a beacon

Default value: true

Select vehicle categories

The DriveKit Vehicle module contains a default category list (based on vehicle type). It is recommended not to modify this list. If it is strictly necessary, it is possible to remove some values or to change the order of the values in the car category list. You must not modify the value of the fields.

DriveKitVehicleUI.configureVehicleCategories(
    listOf(VehicleCategory.MICRO, VehicleCategory.COMPACT, ...)
)

Settings:

Car:

  • MICRO

  • COMPACT

  • SEDAN

  • SUV

  • MINIVAN

  • COMMERCIAL

  • LUXURY

  • SPORT

Truck:

  • TWO_AXLES_STRAIGHT_TRUCK

  • THREE_AXLES_STRAIGHT_TRUCK

  • FOUR_AXLES_STRAIGHT_TRUCK

  • TWO_AXLES_TRACTOR

  • THREE_AXLES_TRACTOR

  • FOUR_AXLES_TRACTOR

Default values: All categories are displayed by default (depending on the type).

By default, the values are all in the list. They will be displayed depending on the selected types.

Select brands

The DriveKit Vehicle module contains a default brand list (based on vehicle category). It is recommended not to modify this list. If it is strictly necessary, it is possible to remove some values or to change the order of the values in this list. You must not modify the value of the fields.

You can choose which brands to display by calling the following method:

DriveKitVehicleUI.configureBrands(
    listOf(VehicleBrand.ABARTH, VehicleBrand.ALFA_ROMEO, ...)
)

Settings:

  • VehicleBrand enum values

Default value: All brands are displayed by default.

Select engine types

The DriveKit Vehicle module contains a default engine type list (based on vehicle brand). It is recommended not to modify this list. If it is strictly necessary, it is possible to remove some values or to change the order of the values in this list. You must not modify the value of the fields.

You can choose which engine type(s) to display by calling the following method:

DriveKitVehicleUI.configureEngineIndexes(
    listOf(VehicleEngineIndex.GASOLINE, VehicleEngineIndex.DIESEL, ...)
)

Settings:

  • GASOLINE

  • DIESEL

  • ELECTRIC

  • GASOLINE_HYBRID

  • PLUG_IN_GASOLINE_HYBRID

  • DIESEL_HYBRID

Default values: [GASOLINE, DIESEL, ELECTRIC, GASOLINE_HYBRID, PLUG_IN_GASOLINE_HYBRID, DIESEL_HYBRID]

Last updated