While in automatic detection mode, the SDK can be forced to start a trip. Doing so will prevent the SDK from detecting stationary moments and force it to continue collecting trip data until the trip is explicitly stopped.
Once the forced trip is stopped, the SDK will resume automatic detections.
The metadata is an NSDictionary representing a map of string to string types. You can use it to attach any piece of information to this trip. The transportModeHint is a hint you can give the SDK about the type of transport the trip is (e.g. car, bicycle, etc.).
In case starting a trip fails, you can check the error to determine the reason.
sentiance.startTrip(metadata, transportModeHint) .addOnSuccessListener { startTripResult ->// The trip was successfully started. } .addOnFailureListener { startTripError ->// Something prevented the trip to start.// Check the status object for more details. }
The metadata is a map of string to string types. You can use it to attach any piece of information to this trip. The transportModeHint is a hint of type TransportMode you can give the SDK about the type of transport the trip is (e.g. car, bicycle, etc.).