Get started
Last updated
Was this helpful?
Last updated
Was this helpful?
Before starting DriveKit Challenge module integration, make sure that you have , especially if you have .
If you use DriveKit Challenge without having initialized DriveKit, an exception will be generated and the SDK will not work in your application.
To add Challenge module to your app, add the following line to your dependencies in your application build.gradle
file:
If you have , an initialization phase is required to use the functions offered by the Challenge component. To initialize Challenge component in your app, you must call the initialization method in onCreate
method of your application class.
To synchronize the list of challenges, call the following method:
You can retrieve the list of challenges stored in the DriveKit local database by calling the previous method but with the SynchronizationType
parameter to CACHE
.
You need to call the following method if you want to get more details and statistics about a defined challenge:
This method have the following parameters:
challengeId
String
Unique identifier of the challenge
synchronizationType
SynchronizationType
Can be DEFAULT
or CACHE
.
- DEFAULT
will synchronize the challenge detail by calling the DriveQuant servers
- CACHE
will retrieve the challenge detail already synchronized in the local database.
You can retrieve the details of a given challenge stored in the DriveKit local database by calling the previous method but with the SynchronizationType
parameter to CACHE
.
To be able to join a given challenge, you can call the following method:
This method have the following parameter:
challengeId
String
Unique identifier of the challenge
and models are described in the References part.
Take a look at the of our DriveKit Demo App to see how it is implemented.
and models are described in the References part.
Take a look at the of our DriveKit Demo App to see how it is implemented.
enum values are described in the References part.
Take a look at the of our DriveKit Demo App to see how it is implemented.