# Get started

## Prerequisite

Before starting DriveKit Timeline UI integration, make sure that you have initialized [Driver Data](https://docs.drivequant.com/driver-data/android/get-started) and[ Common UI](https://docs.drivequant.com/common-ui/android/get-started) modules.

## Integration

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

```gradle
dependencies {
    implementation 'com.drivequant.drivekit:drivekit-timeline-ui:$drivekitui_version'
}
```

{% hint style="info" %}
Replace $drivekitui\_version with the DriveKit version you are using in your app
{% endhint %}

{% hint style="info" %}
On[ this Github repository](https://github.com/DriveQuantPublic/drivekit-ui-android), you can also find a demo application that contains the DriveKit Timeline component. This code is open source and you can use it as an example.
{% endhint %}

## Initialization

If you have [disabled the SDK auto-initialization](https://docs.drivequant.com/get-started-drivekit/android/advanced-configurations#manually-initialize-the-sdk), the Timeline 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:

{% tabs %}
{% tab title="DriveKitDriverDataTimelineUI" %}

```kotlin
fun initialize()
```

{% endtab %}
{% endtabs %}

## Configure main screen scores

You can select which scores you want to display on the main screen as well as the scores ordering, by calling the following method:

{% tabs %}
{% tab title="Kotlin" %}

```kotlin
DriveKitUI.scores = listOf(
   DKScoreType.SAFETY,
   DKScoreType.ECO_DRIVING,
   DKScoreType.DISTRACTION,
   DKScoreType.SPEEDING
)
```

{% endtab %}

{% tab title="Java" %}

```java
DriveKitUI.INSTANCE.setScores(Arrays.asList(
       DKScoreType.SAFETY,
       DKScoreType.ECO_DRIVING,
       DKScoreType.DISTRACTION,
       DKScoreType.SPEEDING)
);
```

{% endtab %}
{% endtabs %}

Default and accepted values:

\[ `SAFETY`, `ECO_DRIVING`, `DISTRACTION`, `SPEEDING` ]

{% hint style="warning" %}
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.
{% endhint %}
