Auto start

The automatic mode detects vehicle movements and triggers the trip analysis without driver intervention while the application is in background. The analysis is stopped automatically at the end of the trip.

This feature is recommended to avoid driver distraction and phone handling while driving. The automatic mode has been optimized to limit the battery drain.

To enable automatic trip detection mode, call the following method:

Kotlin
Java
Kotlin
DriveKitTripAnalysis.activateAutoStart(true)
Java
DriveKitTripAnalysis.INSTANCE.activateAutoStart(true);

To disable automatic trip detection, call the same method with parameter activate set to false

Kotlin
Java
Kotlin
DriveKitTripAnalysis.activateAutoStart(false)
Java
DriveKitTripAnalysis.INSTANCE.activateAutoStart(false);

If a trip is running when automatic trip detection is disabled, the trip will not be canceled. If you want to cancel the trip, you should also call cancelTrip method.