Dolphin MOVE SDK
2.x
2.x
  • Introduction
  • MOVE Services
  • MOVE SDK
    • Getting Started
      • MOVE Dashboard
        • Access Control
        • Configuration
        • Timeline
        • Points of Interest
      • Android
        • Installation
        • Quick Start
      • iOS
        • Installation
        • Quick Start
        • Troubleshooting
      • React Native
      • Flutter
      • Move SDK CLI
    • API Interface
      • Android
        • Initialization
        • Services
      • iOS
        • Initialization
        • Setup
        • Services
      • React Native
        • Components
        • Initialization
        • Services
      • Flutter
        • Initialization
        • Services
    • Models
      • Listeners/Callbacks
      • MoveAssistanceCallStatus
      • MoveAuth
      • MoveAuthError
      • MoveAuthResult
      • MoveAuthState
      • MoveConfig
      • MoveConfigurationError
      • MoveDevice
      • MoveDeviceStatus
      • MoveGeocodeError
      • MoveHealthItem
      • MoveHealthScore
      • MoveOptions
        • DeviceDiscovery
      • MoveSdkState
      • MoveSdkAndroidConfig
      • MoveTripState
      • MoveScanResult
      • MoveServiceFailure
      • MoveServiceWarning
      • MoveShutdownResult
    • Appendix
      • Token refresh
      • Android
        • Permission Handling
          • Permission Overview
          • Runtime Permissions
        • Battery optimization
        • Notification Management
      • iOS
        • Permissions Handling
        • App Store
      • React Native
        • Permission Handling
  • MOVE Backend
    • MOVE Backend
      • MOVE Admin API
      • MOVE TIMELINE API
      • MOVE State API
      • MOVE Last Location API
    • MOVE Generic Notifier
    • MOVE Assistance Notifier
    • Example requests
  • FAQ
  • Changelog
    • Android
    • iOS
    • React
    • Flutter
    • Backend
  • Data privacy (GDPR)
Powered by GitBook
On this page
  1. MOVE SDK
  2. Models

MoveTripState

MOVE Models

PreviousMoveSdkAndroidConfigNextMoveScanResult

Last updated 3 months 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';
import 'package:movesdk/io/dolphin/move/move_trip_state.dart';
enum MoveTripState {
  unknown,
  idle,
  driving,
  halt,
  ignored,
}

MoveTripState

unknown

MOVE SDK detection service didn't start.

idle

Device is in state idle.

driving

Device is actively driving in a trip.

halt

Device is holding position in a trip (e.g. car is not moving, car is standing at a red traffic light).

ignored

Device is in a trip that is flagged as ignored by the host app.

Trip goes through different states during the MOVE SDK's life cycle. Initially the MoveTripState is .unknown, until the service is started.

When service successfully starts, the MoveTripState will transit to .idle state.

When the user starts driving a car or riding a bicycle (if ), a trip will start and the MoveTripState 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 MoveTripState. Halt state means that the user is in an active trip, but is currently stationary. As soon as the MOVE SDK detects that the user's trip has ended, MoveTripState 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 MoveTripState to .ignored MoveTripState. Ignored trips are purged and not forwarded to the server or further processed.

MoveTripState related

Gets the current MoveTripState .

Provide a block to be invoked every time MoveTripState changes.

Ends the current ongoing trip.

Ignores the current ongoing trip.

getTripState ( / / / )

tripStateListener( / / / )

finishCurrentTrip ( / / )

ignoreCurrentTrip ( / / / )

configured
iOS
Flutter
iOS
Flutter
iOS
Flutter
iOS
Flutter
iOS
Flutter
React
Android
React
Android
React
Android
React
Android
React
Android