# 5. Starting Detections

{% hint style="danger" %}
This document refers to deprecated parts of the platform and has been left intact to help customers with legacy integrations. In order to access the latest platform features and documentation, please go to <https://docs.sentiance.com>.
{% endhint %}

By starting detections, the Sentiance SDK will intelligently detect a user's real-world movements while collecting sensor, location, and motion activity data.

Starting detections is only allowed after a successful initialization. Ideally, this step is done immediately after initialization succeeds, as this will guarantee that the SDK is detecting as early and often as possible.

Call the [`start()`](/sdk/api-reference/android/sentiance.md#start) method from the body of [`OnInitCallback.onInitSuccess()`](/sdk/api-reference/android/oninitcallback.md#oninitsuccess):

```java
@Override
public void onInitSuccess() {
    Sentiance.getInstance(context).start(new OnStartFinishedHandler() {
        @Override
        public void onStartFinished (SdkStatus sdkStatus) {
        }
    });
}
```

You can pass an [`OnStartFinishedHandler`](/sdk/api-reference/android/onstartfinishedhandler.md) to the [`start()`](/sdk/api-reference/android/sentiance.md#start) method to be notified of the start status. The next section explains about this status and handling general status updates.

{% hint style="warning" %}
The SDK holds a [weak reference](https://docs.oracle.com/javase/7/docs/api/java/lang/ref/WeakReference.html) to the handler to avoid leaking your Activity or app component. Declare the handler at the class level if you want to make sure the callback gets invoked after `onInitSuccess` returns.
{% endhint %}

{% hint style="info" %}
If you want to have more control over when the Sentiance SDK is doing detections, see [controlled detections](/sdk/appendix/controlled-detections.md).
{% endhint %}


---

# 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://legacy-docs.sentiance.com/sdk/getting-started/android-sdk/starting-detections.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.
