startTrip

Starts an external trip. Requires a Sentiance user to be present on the device.

Calling this method interrupts any ongoing SDK detection, and forces the SDK to stay in a data collection mode. Trips started with this method may time out, in which case, the TripTimeoutListener set using setTripTimeoutListener will be invoked. The timeout duration can be configured for your app by Sentiance.

Parameters

metadata

A map of metadata pertaining to the newly started trip, which will be saved along with the trip data, and made available in backend API query results and offloads. May be null.

transportModeHint

A hint of the transport mode being used, if known. May be null.

Throws

if the SDK is not initialized.


abstract fun startTrip(@Nullable metadata: Map<String, String>, @Nullable transportModeHint: TransportMode, @Nullable callback: StartTripCallback)

Deprecated

Deprecated: use startTrip instead.

Starts a trip.

Note: calling this method on an uninitialized SDK will throw an SdkException.

Parameters

metadata

A map of metadata pertaining to the newly started trip, which will be saved along with the trip data. May be null.

transportModeHint

A hint of the transport mode being used, if known. May be null.

callback

A callback to handle trip start success and failure.