> For the complete documentation index, see [llms.txt](https://docs.movesdk.com/move-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.movesdk.com/move-platform/sdk/models/movetripstate.md).

# MoveTripState

Returns the current user's driving state.

{% tabs %}
{% tab title="Android" %}

```kotlin
enum class MoveTripState {
    UNKNOWN,
    IDLE,
    DRIVING,
    HALT,
    IGNORED
}
```

{% endtab %}

{% tab title="iOS" %}

```swift
enum MoveTripState {
    case unknown
    case driving
    case halt
    case idle
    case ignored
}
```

{% endtab %}

{% tab title="React Native" %}

```javascript
export type TripState = 'UNKNOWN' | 'DRIVING' | 'HALT' | 'IDLE' | 'IGNORED';
```

{% endtab %}

{% tab title="Flutter" %}

```dart
import 'package:movesdk/io/dolphin/move/move_trip_state.dart';
```

```dart
enum MoveTripState {
  unknown,
  idle,
  driving,
  halt,
  ignored,
}
```

{% endtab %}
{% endtabs %}

| **MoveTripState** |                                                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------------------ |
| unknown           | Initial state before the MOVE SDK detection service has started.                                       |
| 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.&#x20;

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

When the user starts driving a car or riding a bicycle (if [configured](/move-platform/sdk/models/moveconfig.md)), 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 ([Android](/move-platform/sdk/api-interface/android/services.md#ignore-current-trip) / [iOS](/move-platform/sdk/api-interface/ios/services.md#ignore-current-trip) / [React](/move-platform/sdk/api-interface/react-native/services.md#ignore-current-trip) / [Flutter](/move-platform/sdk/api-interface/flutter/services.md#ignore-current-trip)). This will transit the `MoveTripState` to `.ignored` `MoveTripState`. Ignored trips are purged and not forwarded to the server or further processed.

<table data-header-hidden><thead><tr><th width="399">MoveTripState related</th><th></th></tr></thead><tbody><tr><td><strong>MoveTripState related</strong></td><td></td></tr><tr><td><code>getTripState</code> (<a href="/pages/-MZIkqoqutrz3W0Y7wdZ#get-trip-state">Android</a> / <a href="/pages/-Mb3IKXSAmopNGeSWiDs#get-trip-state">iOS</a> / <a href="/pages/ujeFo7gN5sE9PfhyLhLK#get-trip-state">React</a> / <a href="/pages/JKL0LkFl27alD5tu3UP0#get-trip-state">Flutter</a>)</td><td>Gets the current <code>MoveTripState</code> .</td></tr><tr><td><code>tripStateListener</code>(<a href="/pages/-MZIfp4AHvpUSOaycA60#trip-state-listener">Android</a> / <a href="/pages/-Mb3IKXSAmopNGeSWiDs#set-trip-state-listener">iOS</a> / <a href="/pages/ujeFo7gN5sE9PfhyLhLK#set-trip-state-listener">React</a> / <a href="/pages/JKL0LkFl27alD5tu3UP0#set-trip-state-listener">Flutter</a>)</td><td>Provide a block to be invoked every time <code>MoveTripState</code> changes.</td></tr><tr><td><code>finishCurrentTrip</code> (<a href="/pages/-MZIkqoqutrz3W0Y7wdZ#finish-current-trip">Android</a> / <a href="/pages/-Mb3IKXSAmopNGeSWiDs#finish-current-trip">iOS</a> / <a href="/pages/ujeFo7gN5sE9PfhyLhLK#finish-current-trip">React</a>  <a href="/pages/JKL0LkFl27alD5tu3UP0#finish-current-trip">Flutter</a>)</td><td>Ends the current ongoing trip.</td></tr><tr><td><code>ignoreCurrentTrip</code> (<a href="/pages/-MZIkqoqutrz3W0Y7wdZ#ignore-current-trip">Android</a> / <a href="/pages/-Mb3IKXSAmopNGeSWiDs#ignore-current-trip">iOS</a> / <a href="/pages/ujeFo7gN5sE9PfhyLhLK#ignore-current-trip">React</a> / <a href="/pages/JKL0LkFl27alD5tu3UP0#ignore-current-trip">Flutter</a>)</td><td>Ignores the current ongoing trip.</td></tr></tbody></table>
