Get started

Prerequisite

Before starting DriveKit Vehicle integration, make sure that you have initialized DriveKit, especially if you have disable the SDK auto-initialization.

If you use DriveKit Vehicle without having initialized DriveKit, an exception will be generated and the SDK will not work in your application.

Integration

Get module from repository

To add Vehicle module to your app, add the following line to your dependencies in your application build.gradle file:

dependencies {
    implementation 'com.drivequant.drivekit:drivekit-vehicle:$drivekit_version'
}

Replace $drivekit_version with the DriveKit version you are using in your app

Initialization

If you have disabled the SDK auto-initialization, an initialization phase is required to use the functions offered by the Vehicle component. To initialize Vehicle component in your app, you must call the initialization method in onCreate method of your application class.

fun initialize()

TripAnalysis configuration overload

The configuration of the Vehicle component and its vehicles can overload the auto start configuration of the TripAnalysis component. To do this, call this method after the Vehicle module initialization:

fun setVehiclesConfigTakeover(vehiclesConfigTakeOver: Boolean)

Example: In the TripAnalysis component, the beaconRequired configuration is false. If the SDK only has beacon vehicles and if this method is called; the beaconRequired configuration of the TripAnalysis is automatically set to true.

Last updated