Links

Get started

Prerequisite

Before starting DriveKit Vehicle UI integration, make sure that you have initialized TripAnalysis and CommonUI modules.

Integration

To add the Trip Analysis UI module to your app, add the following lines to your dependencies in your application build.gradle file:
build.gradle
dependencies {
implementation 'com.drivequant.drivekit:drivekit-trip-analysis-ui:$drivekitui_version'
}
Replace $drivekitui_version with the DriveKit version you are using in your app
On a Github repository, you can find a demo app and the source code of Permissions Utils UI that you can use as an example.

Initialization

An initialization phase is required to use the feature included in the Trip Analysis UI module.
Then, to initialize the Trip Analysis UI module in your app, you must call the initialization method in onCreate method of your Application class:
Kotlin
Java
class MyApplication: Application() {
override fun onCreate() {
super.onCreate()
DriveKit.initialize()
DriveKitTripAnalysis.initialize(...)
DriveKitUI.initialize()
DriveKitTripAnalysisUI.initialize()
...
}
}
public class DriveQuantApplication {
@Override
public void onCreate() {
super.onCreate();
DriveKit.INSTANCE.initialize();
DriveKitTripAnalysis.INSTANCE.initialize(...)
DriveKitUI.INSTANCE.initialize();
DriveKitTripAnalysisUI.INSTANCE.initialize();
...
}}

Working Hours

The Working hours feature sorts the trips according to whether they are made during working hours. The trips are then automatically tagged as "BUSINESS" or "PERSONAL".
The feature also permits to set time slots during which the automatic starting mode is disabled, which offers more privacy control for the driver.
You can start displaying that screen by calling the following method:
Kotlin
Java
DriveKitNavigationController.tripAnalysisUIEntryPoint?.startWorkingHoursActivity(context)
TripAnalysisUIEntryPoint entryPoint = DriveKitNavigationController.INSTANCE.getTripAnalysisUIEntryPoint();
if (entryPoint != null) {
entryPoint.startWorkingHoursActivity(this);
}