Links

References (Android)

StartMode

StartMode indicates how the trip is started. It is an enum with the following values:
Value
Description
Value
Description
GPS
Automatic start when the SDK detects a change in user position
BEACON
Automatic start due to the presence of a beacon
MANUAL
Trip started manually by calling the method startTrip
GEOZONE
Automatic start when the SDK detects that you exit the zone where your vehicle may be parked
BLUETOOTH
Automatic start by detecting a connection to a vehicle's Bluetooth system
UNKNOWN_BLUETOOTH
Automatic start by detecting a connection to a unknown vehicle's Bluetooth system
BICYCLE_ACTIVITY
Automatic start by detecting a bicycle activity
CONNECTED_CAR
Automatic start when the SDK detects that your smartphone has been connected to an Android Auto or Automotive OS system
enum class StartMode(val intValue: Int) {
GPS(1),
BEACON(2),
MANUAL(3),
GEOZONE(4),
BLUETOOTH(5),
UNKNOWN_BLUETOOTH(6),
BICYCLE_ACTIVITY(7),
CONNECTED_CAR(8)
}

CancelTrip

CancelTrip indicates how the trip was cancelled. It is an enum with the following values:
Value
Description
USER
Trip cancelled by calling the method cancelTrip
HIGHSPEED
Trip cancelled because speed was too high (train, airplane)
NO_SPEED
Trip cancelled because speed was too slow to be made in a vehicle
NO_BEACON
Trip cancelled because the beacon was not detected while it was required
MISSING_CONFIGURATION
Trip cancelled because DriveKit was not configured
NO_GPS_DATA
Trip cancelled because no GPS data was recorded
RESET
Trip cancelled because SDK configuration has been reset
BEACON_NO_SPEED
Trip cancelled because the beacon is near the smartphone but there was no movement (zero or low speed)
BLUETOOTH_DEVICE_NO_SPEED
Trip cancelled because the Bluetooth device is connected to the smartphone but there was no movement (zero or low speed)
enum class CancelTrip {
USER,
HIGHSPEED,
NO_SPEED,
NO_BEACON,
MISSING_CONFIGURATION,
NO_GPS_DATA,
RESET,
BEACON_NO_SPEED,
BLUETOOTH_DEVICE_NO_SPEED
}

TripPoint

TripPoint is an object that contains data for each location registered by the SDK.
data class TripPoint(
val latitude: Double,
val longitude: Double,
val speed: Double,
val accuracy: Double,
val elevation: Double,
val distance: Double,
val heading: Double,
val duration: Double
)
Attribute
Type
Description
latitude
Double
Latitude
longitude
Double
Longitude
speed
Double
Speed in km/h
accuracy
Double
Accuracy of the GPS data in meter
elevation
Double
Elevation in meter
distance
Double
Distance since the beginning of the trip in meter
heading
Double
Heading
duration
Double
Duration since the beginning of the trip in second

TripVehicle

TripVehicle is an object that contains vehicle detailed characteristics.
data class TripVehicle (
val carTypeIndex: Int = 1,
val carEngineIndex: Int = 1,
val carPower: Double = 150.0,
val carMass: Double = 1400.0,
val carGearboxIndex: Int = 2,
val carConsumption: Double = 4.5,
val carAutoGearboxNumber: Int = 0,
val engineDisplacement: Double = 1200.0,
val frontTireSize: String? = null,
val rearTireSize: String? = null,
val length: Double? = null,
val width: Double? = null,
val height: Double? = null,
val engineCylinderNb: Int? = null,
val driveWheels: Int? = null
)
Attribute
Type
Description
Default value, if not specified
carTypeIndex
Int
1
carEngineIndex
Int
1
carPower
Double
Vehicle power in hp. This value must be entered in horsepower. In case you only have the engine power in kW you can apply the following formula:
P[hp]=P[kW]/0.7355P [hp] = P [kW] / 0.7355
(min: 40 hp, max 450 hp)
150
carMass
Double
Vehicle mass in kg (min: 700 kg, max: 3500 kg)
1400
carGearboxIndex
Int
2
carConsumption
Double
Combined fuel consumption [l/100km] measured during the New European Driving Cycle (NEDC). (min: 3 l/100km, max: 20 l/100km)
4.5
carAutoGearboxNumber
Int
Number of gear ratios for the automatic gearbox. This parameter is taken into account only if carGearboxIndex is set to 1.
6
engineDisplacement
Double
Engine displacement in liters
1200
frontTireSize
String?
Front tire size
"205/55/16"
rearTireSize
String?
Rear tire size
"205/55/16"
length
Double?
Vehicle length in meter
4.5
width
Double?
Vehicle width in meter
1.8
height
Double?
Vehicle height in meter
1.45
engineCylinderNb
Int?
Number of cylinders
4
driveWheels
Int?
0

TripNotification

TripNotification is an object that contains the configuration of the foreground notification displayed during a trip.
data class TripNotification(val title: String, val content: String, val iconId: Int) {
var cancel: String? = null
var cancelIconId: Int? = null
var enableCancel: Boolean = false
}
Attribute
Type
Description
title
String
Title of the notification
content
String
Content of the notification
iconId
Int
The icon resource for notification
cancel
String
Text of cancel button
cancelIconId
Int
Icon resource of cancel button
enableCancel
Boolean
If true a cancel button will be displayed in notification that cancels the trip when pressed
The cancelIconId and cancel parameters must be set if the enableCancel parameter is set to true.

BeaconData

BeaconData is an object that contains beacon characteristics.
data class BeaconData(
val proximityUuid: String,
val major: Int,
val minor: Int
)
Attribute
Type
Description
proximityUuid
String
Beacon proximity UUID
major
Int
Beacon major value (set to -1 to ignore value)
minor
Int
Beacon minor value (set to -1 to ignore value)

BluetoothData

BluetoothData is an object that contains the Bluetooth device characteristics.
data class BluetoothData(
val macAddress: String,
val name: String?)
Attribute
Type
Description
macAddress
String
Required MAC address of the device
name
String
Optional display name of the device

DeviceConfigEvent

DeviceConfigEvent indicates when the device configuration has been changed. It is a sealed class with the following values:
sealed class DeviceConfigEvent {
data class BLUETOOTH_SENSOR_STATE_CHANGED(val btEnabled: Boolean, val btRequired: Boolean) : DeviceConfigEvent()
}

BLUETOOTH_SENSOR_STATE_CHANGED

This data class is called when the Bluetooth device sensor has been turned on or off.
  • btEnabled : Equals true when the Bluetooth sensor has been turned on.
  • btRequired : Equals true when the DriveKit configuration needs the Bluetooth sensor (when beaconRequired is set to true or when TripAnalysis component is configured with is at least one beacon or one Bluetooth device).

DKCrashInfo

Crash information object have the following structure
data class DKCrashInfo(
val crashId: String,
val date: Date,
val status: CrashStatus,
val probability: Short,
val latitude: Double,
val longitude: Double,
val velocity: Double
)
with the following enumeration for crash status
enum class CrashStatus {
CONFIRMED,
UNCONFIRMED
}
Attribute
Type
Description
crashId
String
Crash unique identifier
date
Date
Crash date
Example: 2023-03-07T09:13:22.461+0200
probability
Short
Crash probability (in %)
latitude
Double
Coordinates (latitude) of the crash
longitude
Double
Coordinates (longitude) of the crash
velocity
Double
Velocity at time of crash
crashStatus
DKCrashStatus
Crash status. Two possible values: CONFIRMED or UNCONFIRMED

DKCrashFeedbackConfig

DKCrashFeedbackConfig is an object used to configure the Crash Detection feedback feature.
data class DKCrashFeedbackConfig(
val notification: DKCrashFeedbackNotification,
val crashVelocityThreshold: Double = 0.0,
)
Attribute
Type
Description
notification
DKCrashFeedbackNotification
Configuration of the notification
crashVelocityThreshold
Double
Minimal speed when the crash occurred.
For example, if crashVelocityThreshold is set at 20 km/h and a crash occurred at 10 km/h, feedback will not be sent to the user.
Default value : 0.0 km/h

DKCrashFeedbackNotification

Attribute
Type
Description
icon
Int
Resource identifier of the notification icon
channelId
String
Android channel identifier. Default value: dq_sdk_crash_channel
notificationId
Int
Android notification identifier
title
String
Title that appears on the notification
message
String
Message that appears on the notification
activity
Class<*>
Activity to display
crashAlert
DKCrashAlert
Object that describes how the user will be noticed when a feedback is asked Default value : SILENCE

DKCrashAlert

Attribute
Description
SILENCE
Device will not vibrate or ring
VIBRATION
Device will vibrate
SOUND_AND_VIBRATION
Device will ring and vibrate

CrashFeedbackType

Enum value
Description
NO_CRASH
User said that no crash occurred
CRASH_CONFIRMED
User confirmed a crash
NO_FEEDBACK
User did not provide any feedback

CrashFeedbackSeverity

Enum value
Description
NONE
User said that no crash occurred
MINOR
User confirmed a minor crash
CRITICAL
User confirmed a critical crash