Beacon usage

Configure beacons

The automatic trip detection feature is compliant with iBeacon Bluetooth beacons. A beacon is a Bluetooth low energy (BLE) device that broadcasts a universally unique identifier. This signal can be detected by the SDK and used to trigger the trip analysis.
In addition, the beacon is a smart and cost-effective solution for identifying the vehicle in which the driver is travelling.
The DriveKit SDK is fully compatible with the Apple iBeacon™ standard.
You can add beacon identifiers to Trip Analysis SDK by calling the following method:
DriveKitTripAnalysis.shared.setBeacons(beacons: [Beacon])
A detailed description of Beacon class is available here.
Beacons can have 3 configurations:
  • Only proximityUuid: All beacons with this proximityUuid value can start a trip (independently from major and minor value).
    • Beacon(proximityUuid: String)
  • ProximityUuid + major: All beacons with this proximityUuid and major values can start a trip (independently from minor value).
    • Beacon(proximityUuid: String, major: Int)
  • ProximityUuid + major + minor: All beacons with this proximityUuid, major and minor values can start a trip.
    • Beacon(proximityUuid: String, major: Int, minor: Int)
Since iOS13, iOS beacon functions have some limitations, therefore all configured beacons must have the same proximity UUID.
If you want to remove beacons from SDK configuration, just call the method with an empty array.
On iOS, there is a limitation of 20 regions (including beacons) that can be monitored. Consequently, make sure that you limit to the minimum the number of beacons configured in the SDK.
"Regions are shared resources that rely on specific hardware capabilities. To ensure that all apps can participate in region monitoring, Core Location prevents any single app from monitoring more than 20 regions simultaneously."

Beacon required

To avoid the recording of unwanted trips (trips performed outside the vehicle where the beacon is placed), it is possible to automatically cancel the trip if the beacon is not "seen" several times during the trip. Generally, a trip will be cancelled in less than 6 minutes if the beacon is not in the vehicle.
By default, this setting is disabled, but you can enable it by calling the following method:
DriveKitTripAnalysis.shared.setBeaconRequired(required: true)
To disable this settings, call the same method with the parameter set to false
DriveKitTripAnalysis.shared.setBeaconRequired(required: false)
Export as PDF
Copy link