MoveTripState
Last updated
Last updated
Returns the current user's driving state.
MoveTripState
unknown
SDK detection service didn't start.
idle
Device is in idle.
driving
Device is actively driving in a trip.
halt
Device is holding position in a trip.
ignored
Device is in a trip that is flagged as ignored by the host app.
Trip goes through different states during the SDK's life cycle. Initially the is .unknown
, until the service is started.
When service successfully starts, the will transit to .idle
state.
When the user starts driving a car or riding a bicycle (if ), a trip will start and the will transit to .driving
. During the trip, the user could sometimes choose to go to temporarily idle (like in traffic jams, traffic stops, etc.), this is expressed through the .halt
. Halt state means that the user is in an active trip, but is currently stationary. As soon as the SDK detects that the user's trip has ended, will transit back again to .idle
.
While being on a trip, the host app can choose to ignore the ongoing trip using the ignoreCurrentTrip
API ( / ). This will transit the to .ignored
. Ignored trips are purged and not forwarded to the server or further processed.
MoveTripState related APIs
Ends the current ongoing trip.
Ignores the current ongoing trip.
getTripState
( / )
Gets the current .
setTripStateListener
( / )
Provide a block to be invoked every time changes.
finishCurrentTrip
( / )
ignoreCurrentTrip
( / )