Get started

Prerequisite

Before starting DriveKit Challenge UI integration, make sure that you have initialized Challenge and Common UI components.

Integration

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

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

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

On this Github repository, you can find also a demo application that contains the DriveKit challenge component. This code is open source and you can use it as an example.

Initialization

If you have disabled the SDK auto-initialization, the Challenge 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:

fun initialize()

Display Challenge list

To be able to get the list of Challenge in your application, you need to use this following method:

ChallengeUI.startChallengeActivity(context: Context)

This method will automatically synchronize challenge data and start a new activity with our default implementation.

You can also use the challenge list fragment

ChallengeUI.createChallengeListFragment()

Last updated