Integration
The React Native libraries for DriveKit SDK are open source and available on GitHub: https://github.com/DriveQuantPublic/react-native-drivekit
If you want to get a sample code to install DriveKit in your React Native application, you can test our demo application.
If you prefer to integrate the SDK directly into your application, please follow the next steps.
First you have to install the Core component which allows you to initialise the DriveKit SDK, to configure your API key and to declare a user. The Core component is mandatory.
React Native librairie are available via NPM. First, install the library:
npm install @react-native-drivekit/core
and install iOS pods:
cd ios && pod install
On Android, you must add the DriveKit Maven repository in your top-level
build.gradle
:allprojects {
repositories {
maven {
url "https://maven.drivequant.com/repository/android-sdk/"
}
}
}
The step by step procedure to initialise the SDK, set your API Key and create a user is described in the Core component README.
After installing the Core component, you need to install the Trip Analysis component which allows you to record trips and configure the recording modes.
First, install the library:
npm install @react-native-drivekit/trip-analysis
and install iOS pods:
cd ios && pod install
To initialise Trip Analysis and enable the autostart mode, follow the steps described in the Trip Analysis component README.
The Driver Data module manages the driver trips display (list and details) and ensures the synchronisation of driver data.
First, install the library:
npm install @react-native-drivekit/driver-data
and install iOS pods:
cd ios && pod install
To initialise Driver Data and get driver trips data, follow the steps described in the Driver Data component README.
To verify the DriveKit Trip Analysis component integration into your app, it is recommended to perform tests in real conditions. Before carrying out driving tests, it may be useful to validate the implementation of the SDK in your application.
It is strongly recommended not to integrate this component into an application built for production. This component has been designed to facilitate preliminary testing and should never remain in your production app.
First, install the library:
npm install @react-native-drivekit/trip-simulator
and install iOS pods:
cd ios && pod install
Last modified 5mo ago