Score overview

This section introduces graphical elements that simplify the display of driver behaviour scores synthesis.

Driver synthesis scorecard

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:

Kotlin
Java
Kotlin
DriverDataUI.getLastTripsSynthesisCardsView(
listOf(
LastTripsSynthesisCard.SAFETY,
LastTripsSynthesisCard.ECO_DRIVING,
LastTripsSynthesisCard.ECO_DRIVING,
LastTripsSynthesisCard.SPEEDING
), object : SynthesisCardsViewListener {
override fun onViewLoaded(fragment: DKSynthesisCardViewPagerFragment) {
}
})
Java
final ArrayList<LastTripsSynthesisCard> cards = new ArrayList<>();
cards.add(LastTripsSynthesisCard.SAFETY);
cards.add(LastTripsSynthesisCard.ECO_DRIVING);
cards.add(LastTripsSynthesisCard.DISTRACTION);
cards.add(LastTripsSynthesisCard.SPEEDING);
DriverDataUI.INSTANCE.getLastTripsSynthesisCardsView(cards, new SynthesisCardsViewListener() {
@Override
public void onViewLoaded(@NotNull DKSynthesisCardViewPagerFragment fragment) {
}
});

The order in which the scorecards are displayed corresponds to the order of the items in the table. To hide a theme, simply do not add it to the table.

The value SPEEDING can be set only if this configuration is enabled for your API key.