# Checking Trip Status

In both [automatic](https://github.com/sentiance/v4-docs/blob/main/important-topics/sdk/appendix/controlled-detections/broken-reference/README.md) and [controlled](https://github.com/sentiance/v4-docs/blob/main/important-topics/sdk/appendix/controlled-detections/broken-reference/README.md) detection modes, you can check the SDK if a trip is ongoing at that moment.

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

```swift
Sentiance.shared.isTripOngoing(ofType: .external)
```

The method takes a `SENTTripType` parameter to specify the type of trip you are interested in. You can pass `SDK` or `external`.
{% endtab %}

{% tab title="Android" %}

```kotlin
val isTripOngoing = sentiance.isTripOngoing(tripType)
```

The method takes a [`TripType`](/important-topics/sdk/api-reference/android/trip/triptype.md) parameter to specify the type of trip you are interested in. You can pass any one of `EXTERNAL_TRIP`, `SDK_TRIP`, and `ANY` to query the trip status.
{% endtab %}
{% endtabs %}

Trip types are classified as follows:

* External: a trip that has been started by your app.
* SDK: a trip that has been started by the SDK based on automatic detections.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sentiance.com/important-topics/sdk/appendix/controlled-detections/checking-trip-status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
