LogoLogo
ProductsUse casesDocsSupport
  • Introducing DriveKit
  • DriveKit Guides
  • Get started with drivekit
    • Trip recording lifecycle
    • iOS
      • 🚀Quick start
      • Advanced configurations
      • References
      • iOS DriveKit Demo App
    • Android
      • 🚀Quick start
      • Advanced configurations
      • References
      • Android DriveKit Demo App
      • Android 15 Migration guide
      • Android 14 Migration guide
      • Troubleshooting
  • Trip analysis
    • Introduction
    • iOS
      • Permissions
      • Trip management
      • TripListener
      • Crash Detection
      • Beacon usage
      • Bluetooth usage
      • Custom metadata
      • References (iOS)
    • Android
      • Runtime permissions
      • Trip management
      • TripListener
      • Crash Detection
      • Beacon usage
      • Bluetooth usage
      • Custom metadata
      • References (Android)
    • User interface
      • iOS
        • Get started
        • Working hours
        • Driver alert in case of crash
        • Trip recording widget
        • Location sharing
      • Android
        • Get started
        • Working hours
        • Driver alert in case of crash
        • Trip recording widget
        • Location sharing
    • REST services
      • Trip
      • References
    • Trip Simulator
      • iOS
      • Android
  • PERMISSIONS UTILS
    • Introduction
    • User interface
      • iOS
        • Get started
        • Main configurations
      • Android
        • Get started
        • Main configurations
  • COMMON UI
    • Introduction
    • iOS
      • Get started
    • Android
      • Get started
    • References
  • DRIVER DATA
    • Introduction
    • iOS
      • Get started
      • References (iOS)
    • Android
      • Get started
      • References (Android)
    • User interface
      • iOS
        • Get started
        • Advanced configurations
        • Trips widgets
        • My Synthesis
        • My Driver Profile
      • Android
        • Get Started
        • Advanced configurations
        • Trips widgets
        • My Synthesis
        • My Driver Profile
  • Driver Data Timeline UI
    • Introduction
    • iOS
      • Get started
    • Android
      • Get started
  • Vehicle
    • Introduction
    • iOS
      • Get started
      • Vehicle management
      • Beacon management
      • Bluetooth device management
      • Odometer
      • References (iOS)
    • Android
      • Get started
      • Vehicle management
      • Beacon management
      • Bluetooth device management
      • Odometer
      • References (Android)
    • User interface
      • iOS
        • Get started
        • Main configurations
        • Advanced configurations
      • Android
        • Get started
        • Main configurations
        • Advanced configurations
  • DRIVER ACHIEVEMENT
    • Introduction
    • iOS
      • Get started
    • Android
      • Get Started
    • User interface
      • iOS
      • Android
  • CHALLENGE
    • Introduction
    • Important challenge rules
    • iOS
      • Get started
      • References (iOS)
    • Android
      • Get started
      • References (Android)
    • User interface
      • iOS
        • Get started
      • Android
        • Get started
  • GROUP
    • Introduction
    • iOS
      • Get started
    • Android
      • Get started
  • React Native
    • Get started
    • Integration
  • Flutter
    • Get started
    • Integration
  • Push services
    • Introduction
    • Push Trip Data
    • Push Deleted trip
    • Push Crash Data
    • Push Diagnosis Data
  • ADMIN SERVICES
    • Beacon
      • Add
      • Replace
      • Delete
      • Configuration
    • Challenges
      • List of challenges
      • Challenge details
      • Registered users
      • Challenge ranking
      • Users' progress
      • Definitions
    • Customer
      • Activity timeline
    • Driver
      • Timeline
      • Synthesis
      • Identity
      • Status
      • Add or update a metadata
      • Vehicles
      • Profile
      • Application diagnoses
    • Drivers
      • Account
      • Statistics
      • Ranking
      • Expired accounts
    • Group
      • Timeline
      • Synthesis
    • Trips
      • Add or update a metadata
      • Delete a metadata
    • Vehicle
      • Create
      • Characteristics
      • Configuration
      • Statistics
      • Update mileage
      • Tire and brake wear update
      • References
  • Crashes
    • Annotate a crash
    • Revoke crash location URL
  • ENTERPRISE SERVICES
    • Introduction
    • Teams
      • Create a team
      • List of teams
      • Enable or disable a team
    • Hyper-admins
      • Create a hyper-admin
      • List of hyper-admins
      • Delete a hyper-admin
    • Monitoring
      • Get a push trip data report
      • Get a push crash data report
      • Request to retry failed trips
      • Request to retry failed crashes
      • Get the status of a task
  • Release notes
    • Changelog
      • iOS
      • Android
      • UI iOS
      • UI Android
Powered by GitBook
On this page
  • Pre-requisite
  • Integration
  • Google API Key
  • Introduction
  • Create an API Key
  • Add the API Key
  • Initialization
  • Override colors and texts
  • Trip list main theme
  • Trip map items

Was this helpful?

Export as PDF
  1. DRIVER DATA
  2. User interface
  3. Android

Get Started

PreviousAndroidNextAdvanced configurations

Last updated 1 year ago

Was this helpful?

Pre-requisite

Before starting DriveKit Driver Data UI integration, make sure that you have and components, especially if you have .

Integration

To add Driver Data UI module to your app, add the following line to your dependencies in your application build.gradle file:

dependencies {
    implementation 'com.drivequant.drivekit:drivekit-driver-data-ui:$drivekitui_version'
}

Replace $drivekitui_version with the DriveKit version you are using in your app

On a , you have a demo app and source code of Driver Data UI that you can use as an example.

Google API Key

Introduction

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

Create an API Key

Add the API Key

Initialization

Then, to initialize the module in your app, you must call the initialization method in onCreate method of your Application class:

fun initialize()

Override colors and texts

Trip list main theme

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.

  • DURATION: The trip distance.

  • DISTANCE: The driving duration.

  • SPEEDING: The speeding 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:

fun configureTripData(tripData: TripData)

The default value is SAFETY.

Trip map items

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 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.

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:

fun configureMapItems(mapItems: List<MapItem>)

The default value is:

[SAFETY, ECODRIVING, DISTRACTION, SPEEDING, INTERACTIVE_MAP, SYNTHESIS]

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

Display fragment

To show fragment in your activity, you just have to create an instance of TripListFragment with the following method:

DriverDataUI.createTripListFragment()
DriverDataUI.INSTANCE.createTripListFragment();

and then show it using a FragmentManager.

supportFragmentManager.beginTransaction()
    .replace(R.id.container, DriverDataUI.createTripListFragment())
    .commit()
getSupportFragmentManager().beginTransaction()
    .replace(R.id.container, DriverDataUI.INSTANCE?.createTripListFragment())
    .commit();

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.

To override colors and texts in Driver Data UI SDK, see

initialized DriverData
Common UI
disabled the SDK auto-initialization
Github repository
official documentation
Adding the API Key to your app
here
here
disabled the SDK auto-initialization
Common UI configuration.
Trip map items