Trips widgets

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:

fun getLastTripsSynthesisCardsView(
    synthesisCards: List<LastTripsSynthesisCard> = listOf(
        LastTripsSynthesisCard.SAFETY,
        LastTripsSynthesisCard.DISTRACTION,
        LastTripsSynthesisCard.ECO_DRIVING,
        LastTripsSynthesisCard.SPEEDING
    ), listener: SynthesisCardsViewListener
)

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.

Last trip widget

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:

fun getLastTripsView(
    headerDay: HeaderDay = HeaderDay.DISTANCE,
    lastTripMaxNumber: Int = 10
): Fragment {

And embed the returned view into your layout.

Last updated