Get started

Prerequisite

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

Integration

Get framework from repository

To add Vehicle module to your app, add the following line to your dependencies in your application build.gradle file:
1
dependencies {
2
implementation 'com.drivequant.drivekit:drivekit-vehicle:1.13.0'
3
}
Copied!

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, you should call this method after the Vehicle component initialization:
Kotlin
Java
1
DriveKitTripAnalysis.setVehiclesConfigTakeover(true)
Copied!
1
DriveKitTripAnalysis.INSTANCE.setVehiclesConfigTakeover(true)
Copied!
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 true.

Reset

If you need to reset Vehicle configuration (user logout for example), you can call the following method:
Kotlin
Java
1
DriveKitVehicle.reset()
Copied!
1
DriveKitVehicle.INSTANCE.reset()
Copied!
All data saved locally by Vehicle component will be erased and default configuration will be restored.
Last modified 1mo ago