Dolphin MOVE SDK
SDK
1.x
1.x
  • Introduction
  • MOVE Services
  • MOVE SDK
    • Getting Started
      • MOVE Dashboard
      • Android
        • Installation
        • Quick Start
      • iOS
        • Installation
        • Quick Start
      • React Native
    • API Interface
      • Android
        • Initialization
        • Services
      • iOS
        • Initialization
        • Services
      • React Native
        • Initialization
        • Services
    • Models
      • MoveAuth
      • MoveConfig
      • MoveConfigurationError
      • MoveDeviceStatus
      • MoveSDKState
      • MoveTripState
      • MoveAuthState
      • Listeners/Callbacks
    • Appendix
      • Android
        • Token refresh
        • Permission Handling
        • Battery optimization
        • Notification Management
      • iOS
        • Permissions Handling
        • App Store
  • MOVE Backend
    • MOVE Timeline
    • MOVE State
    • MOVE Last Location
    • MOVE Generic Notifier
    • Open Api Specification
  • Changelog
    • Android
    • iOS
  • Data privacy (GDPR)
Powered by GitBook
On this page
  1. MOVE SDK
  2. Models

MoveTripState

PreviousMoveSDKStateNextMoveAuthState

Last updated 3 years ago

Returns the current user's driving state.

enum class MoveTripState {
    UNKNOWN,
    IDLE,
    DRIVING,
    HALT,
    IGNORED
}
enum MoveTripState {
    case unknown
    case driving
    case halt
    case idle
    case ignored
}
export type TripState = 'unknown' | 'driving' | 'halt' | 'idle' | 'ignored';

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 ( / )

MoveTripState
MoveTripState
MoveTripState
MoveTripState
configured
MoveTripState
MoveTripState
MoveTripState
MoveTripState
MoveTripState
iOS
iOS
iOS
iOS
iOS
Android
Android
Android
Android
Android