enable Trip Detection

fun enableTripDetection(vehicleType: LRVehicleType, resultListener: (LRResult) -> Unit? = null)

Enable trip detection Trip detection will scan the user activity to detect trips for the given vehicle type. When a trip is detected, the library will notify the client with the detected vehicle by calling the LRTripDetectionListener.onTripDetected(vehicleType) method for registered listeners. This method will check if the required permissions are granted before enabling trip detection. If not, it will return an error. This state is persisted and will be restored when the application is killed and restarted so that the client doesn't need to enable trip detection again.

Parameters

vehicleType

the vehicle type

resultListener

the result listener. Optional