Get started

Prerequisite

Before starting DriveKit Vehicle integration, make sure that you have initialized DriveKit.

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

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:

DriveKitTripAnalysis.setVehiclesConfigTakeover(true)

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.

Reset

If you need to reset Vehicle configuration (user logout for example), you can call the following method:

DriveKitVehicle.reset()

All data saved locally by Vehicle component will be erased and default configuration will be restored.

Last updated