Bluetooth usage

Principle

Bluetooth wireless technology is a common solution in modern vehicles. Most drivers know that by pairing their Bluetooth smartphone with their car stereo receiver, they will be able to make hands-free calls or to stream their music to the car audio system.
Once the smartphone's paired with the vehicle, it automatically connects to it if the vehicle is started.
Trip Analysis component is capable of detecting this event to start a trip analysis.
A Bluetooth device is identified by a unique MAC address and an optional name. It can be detected by the SDK and used to trigger the trip analysis.
The use of the vehicle Bluetooth detection is a simple and cost-effective solution to identify the trips made with your vehicle.

Configure a Bluetooth device

You can retrieve all Bluetooth devices paired to the smartphone by calling the following method:
Kotlin
Java
1
val bluetoothDevices = DriveKitTripAnalysis.getBluetoothPairedDevices()
Copied!
1
List<BluetoothData> bluetoothDevices =
2
DriveKitTripAnalysis.INSTANCE.getBluetoothPairedDevices()
Copied!
You can add Bluetooth devices to Trip Analysis component by calling the following method:
Kotlin
Java
1
val bluetoothData = BluetoothData("E8:EC:A3:01:68:4C", "Bluetooth Device Name")
2
DriveKitTripAnalysis.setBluetoothDevices(listOf(bluetoothData))
Copied!
1
List<BluetoothData> bluetoothDevices = new ArrayList<>();
2
BluetoothData bluetoothData = new BluetoothData("E8:EC:A3:01:68:4C", "Bluetooth Device Name");
3
bluetoothDevices.add(bluetoothData);
4
DriveKitTripAnalysis.INSTANCE.setBluetoothDevices(bluetoothDevices);
Copied!
A detailed description of BluetoothData class is available here.
If you want to remove Bluetooth devices from SDK configuration, just call the method with an empty array.
Last modified 8mo ago
Export as PDF
Copy link