Before starting DriveKit Driver Data UI integration, make sure that you have initialized DriverData and Common UI components, especially if you have disabled the SDK auto-initialization.
To add Driver Data UI module to your app, add the following line to your dependencies in your application build.gradle file:
A Google API Key is mandatory in order to use Driver Data UI. Without it, the trip detail screen will not work because it draws the desired trip using the Google Maps SDK that requires credentials.
According to the , please check that you already have:
a billing account
Maps SDK for Android enabled
If you already have a Google API Key that can be used for Maps SDK, directly go to the section
Please follow the official documentation to create your own Google API Key.
Please follow the official documentation to add the API Key to your application project.
If you have , the Driver Data UI module must also be manually initialized.
Then, to initialize the module in your app, you must call the initialization method in onCreate method of your Application class:
To override colors and texts in Driver Data UI SDK, see
It is possible to choose the main theme for the trip list. The main theme of the trip list is used to select the score to be displayed on the left side of the trip list. This setting allows you to choose among one of the 6 themes below:
SAFETY: The driving safety score.
ECO_DRIVING: The eco-driving score.
DISTRACTION: The driving distraction score.
The value SPEEDING can be set only if this configuration is enabled for your API key.
The main theme can be configured calling the following method:
The default value is SAFETY.
A trip is analyzed through several dimensions and DriveQuant's services provide multiple categories of scores. Depending on your need, you can highlight the scores of interest and hide some of them. The configuration of the trip detail screen allows to choose the displayed themes and the displaying order. To switch from one theme to another, simply swipe the bottom part of the screen or click on one of the pictograms in the navigation bar at the top of the screen.
The screens that can be displayed are listed below:
The safety analysis results: SAFETY.
The eco-driving results: ECO_DRIVING.
The distracted driving results: DISTRACTION.
The value SPEEDING can be set only if this configuration is activated on your team.
Map items can be configured by calling the following method:
The default value is:
[SAFETY, ECODRIVING, DISTRACTION, SPEEDING, INTERACTIVE_MAP, SYNTHESIS]
To show fragment in your activity, you just have to create an instance of TripListFragment with the following method:
and then show it using a FragmentManager.
DURATION: The trip distance.
DISTANCE: The driving duration.
SPEEDING: The speeding score.
The speeding driving results: SPEEDING.
A scrollable list that displays all the events that occurred during the trip: INTERACTIVE_MAP.
Synthetic data of the trip as average speed, CO2 emissions, estimated fuel consumption, driving conditions: SYNTHESIS.
dependencies {
implementation 'com.drivequant.drivekit:drivekit-driver-data-ui:$drivekitui_version'
}fun initialize()fun configureTripData(tripData: TripData)fun configureMapItems(mapItems: List<MapItem>)DriverDataUI.createTripListFragment()DriverDataUI.INSTANCE.createTripListFragment();supportFragmentManager.beginTransaction()
.replace(R.id.container, DriverDataUI.createTripListFragment())
.commit()getSupportFragmentManager().beginTransaction()
.replace(R.id.container, DriverDataUI.INSTANCE?.createTripListFragment())
.commit();

The SDK includes a feature that allows the user to manually delete a trip. Depending on your use case, you can allow or prohibit the deletion of a trip.
Therefore, the SDK contains a setting parameter to show or hide the delete button. The delete trip button is displayed as a "trash can" and appears at the top right of the trip detail screen.
By default delete trip button is enabled. To disable it, call the following method with parameter enableDeleteTrip set to false:
The analyzed trips are displayed on a list. This list shows the grouped trips by day from the most recent to the oldest one.
If more than one trip have been completed in a day, the trips for a day can be sorted in ascending or descending order of time.
By default, trips are sorted in ascending order, to change it, call the following method with parameter dayTripDescendingOrder set to true:
If trip advice is configured for your DriveQuant account, drivers will receive trip advice at the end of a trip according to their driving.
For this advice, you can enable a feedback screen that allows yours drivers to send a feedback about the relevance of the advice.
By default, this screen is enabled but you can disable it by calling the following method with parameter enable set to false:
The DriveKit SDK can detect alternative modes of transport such as public transport. In this case, the driver behaviour is not evaluated since he is not in a driving situation.
The Driver Data component automatically splits the rated trips from those that should not be rated in two separate lists.
The main list contains the trips scored and corresponding to transport modes where the user is in a driving situation (car, motorbike or truck).
The secondary list displays the trips identified in transportation modes where the user is not in a driving situation.
We have chosen to distinguish these trips and separate them into two independent lists. The list of main trips (i.e. scored) is always displayed by default. The list of alternative trips (i.e. not scored) can be shown or hidden according to your needs. By default, it is not displayed.
When this function is enabled, a filter icon appears in the upper right corner of the trip list screen. By clicking on it, you can select the list of trips made with an alternative mode of transport. To display the list of trips identified as alternative transportation modes, you can use the code below.


fun enableDeleteTrip(enableDeleteTrip: Boolean)fun dayTripDescendingOrder(dayTripDescendingOrder: Boolean)fun enableAdviceFeedback(enableAdviceFeedback: Boolean)fun enableAlternativeTrips(enableAlternativeTrips: Boolean)My synthesis screen contains two very interesting insights for the driver:
His level against a reference scale that tells him whether he needs to make efforts and progress ;
His level in regard to the performance of other drivers belonging to the same organisation as him. The comparison is an interesting lever to motivate the driver to improve his driving.
For each selectable period, the driver will be able to view his average score computed by services that run on the DriveQuant platform.
The user can easily navigate to consult:
The evolution of his driving scores by theme compared to the previous active period ;
His driving score compared to the community thanks to the minimal, median and max community scores ;
How many trips and total distance he made during the selected period.
​​To display the “My Synthesis” screen into your app, call the following method:
You can select which scores you want to display on the screen as well as the scores ordering, by calling the following method:
Default and accepted values are:
For DISTRACTION and SPEEDING scores, make sure that the services are activated on your DriveQuant account or the SDK will filter them out and they will not be displayed in the UI even if you add them here.

DriveKitNavigationController.driverDataUIEntryPoint?.startMySynthesisActivity(context)DriveKitNavigationController.INSTANCE.getDriverDataUIEntryPoint().startMySynthesisActivity(context);var scores: List<DKScoreType> = DKScoreType.values().toList()[SAFETY, ECO_DRIVING, DISTRACTION, SPEEDING]This section introduces graphical elements that simplify the display of driver behaviour scores synthesis.
The Driver Data component includes a component to visualise the average performance of a driver.
The synthesis scorecard shows as main information the averages of each of the driving scores calculated over a 7 days since the last trip date.
The synthesis scorecard also indicates, over this period, the number of trips performed as well as the total distance and driving duration.
The component allows you to select the scores displayed and the order in which they are displayed. To move from one score to another, simply swipe the scorecards.
To include the scorecards into your app, call the following method:
The value SPEEDING can be set only if this configuration is enabled for your API key.
The Driver Data component includes a widget to display a short chronological list of the driver's last trips.
With the last trip widget, the driver can get a quick overview of his last 10 trips with a simple swipe.
Each small card corresponds to a trip and the user can access the full details and map view by tapping on the current card.
By selecting the last card, the user can access the list of all the trips.
​​To include the last trip widget into your app, call the following method:
And embed the returned view into your layout.



fun getLastTripsSynthesisCardsView(
synthesisCards: List<LastTripsSynthesisCard> = listOf(
LastTripsSynthesisCard.SAFETY,
LastTripsSynthesisCard.DISTRACTION,
LastTripsSynthesisCard.ECO_DRIVING,
LastTripsSynthesisCard.SPEEDING
), listener: SynthesisCardsViewListener
)fun getLastTripsView(
headerDay: HeaderDay = HeaderDay.DISTANCE,
lastTripMaxNumber: Int = 10
): Fragment {The main screen is divided into three parts:
The first describes the different components of the driver profile.
The second one displays the estimated and actual distances per period (week, month and year).
The third one gives the most common driver’s trip in terms of distance and duration.
Every driver has a signature that depends on how they use their vehicle. The driver profile function gives an accurate overview of the driver's profile based on an analysis of his driving data.
We have divided the driver profile into 5 characteristics that depends on key variables:
the annual distance driven per year
the mobility area that includes 90% of the driver’s trips,
the percentage of weeks during which the driver has used his vehicle,.,
the regularity based on the relative standard deviations of the weekly distance and trip number.
the main driving context.
These cards compare for different periods (week, month and year)the actual distance (ie. recorded) with the estimated distance computed from the driver historical data.
The purpose of this section is to highlight the driver's most common trip in terms of duration and distance.
​​To include the “Driver Profile” screen into your app, call the following method:
And present the returned view controller using your app’s navigation API.
To visualize the exposure to the external conditions, we have embedded a screen in the graphical component DriverData UI representing the distances covered by the driver in these conditions and per period: week, month and year.
The driver can scroll through cards to visualize the conditions that result from the analysis of his trips:
the ranges of distances mostly traveled;
trips made during the week or on weekends;
the types of roads travelled;
the weather conditions;
day and night trips;
This information helps the driver to be conscious of the inherent risks and is useful to personalize the driving advice.
You can access this screen by clicking on the button “View my driving conditions” in the main screen.
If you want to include the “Driving Conditions” screen into your app as a standalone screen, call the following method:
And present the returned view controller using your app’s navigation API.
DriveKitNavigationController.driverDataUIEntryPoint?.startDriverProfileActivity(context)DriveKitNavigationController.INSTANCE.getDriverDataUIEntryPoint().startDriverProfileActivity(context);DriveKitNavigationController.driverDataUIEntryPoint?.startDrivingConditionsActivity(context)DriveKitNavigationController.INSTANCE.getDriverDataUIEntryPoint().startDrivingConditionsActivity(context);



