If you want to enable the automatic trip detection mode, DriveKitTripAnalysis.activateAutoStart(true)must be called once the Activity Recognition runtime permission is granted by the user. Read more.
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.
By default, automatic trip detection is disabled, but you can enable it by calling the following method: