> 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/move-sdk-1.x/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" %}

```
export type TripState = 'unknown' | 'driving' | 'halt' | 'idle' | 'ignored';
```

{% endtab %}
{% endtabs %}

| 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 [MoveTripState](/move-platform/move-sdk-1.x/sdk/models/movetripstate.md) is `.unknown`, until the service is started.&#x20;

When service successfully starts, the [MoveTripState](/move-platform/move-sdk-1.x/sdk/models/movetripstate.md) will transit to `.idle` state.

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

| MoveTripState related APIs                                                                                                                                                                                                                                                   |                                                                                                                            |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `getTripState` ([Android](/move-platform/move-sdk-1.x/sdk/api-interface/android-1/android.md#get-trip-state) / [iOS](/move-platform/move-sdk-1.x/sdk/api-interface/ios.md#get-trip-state))                                                                                   | Gets the current [MoveTripState](/move-platform/move-sdk-1.x/sdk/models/movetripstate.md) .                                |
| `setTripStateListener`([Android](https://docs.movesdk.com/move-platform/move-sdk-1.x/sdk/models/pages/-MZIfp4AHvpUSOaycA60#DolphinSdk.Builderv1.1-tripstatelistenerTripstatelistener) / [iOS](/move-platform/move-sdk-1.x/sdk/api-interface/ios.md#set-trip-state-listener)) | Provide a block to be invoked every time [MoveTripState](/move-platform/move-sdk-1.x/sdk/models/movetripstate.md) changes. |
| `finishCurrentTrip` ([Android](/move-platform/move-sdk-1.x/sdk/api-interface/android-1/android.md#finish-current-trip) / [iOS](/move-platform/move-sdk-1.x/sdk/api-interface/ios.md#finish-current-trip))                                                                    | Ends the current ongoing trip.                                                                                             |
| `ignoreCurrentTrip` ([Android](/move-platform/move-sdk-1.x/sdk/api-interface/android-1/android.md#ignore-current-trip) / [iOS](/move-platform/move-sdk-1.x/sdk/api-interface/ios.md#ignore-current-trip))                                                                    | Ignores the current ongoing trip.                                                                                          |
