# 5. Enabling Detections

After creating a Sentiance user, you can enable SDK detections. This will allow the Sentiance SDK to run in the background, and intelligently detect a user's real-world movements, while collecting sensor, location, and motion activity data.

{% code title="app.dart" %}

```dart
import 'package:sentiance_core/sentiance_core.dart';

final sentiance = SentianceCore();

void enableSentianceDetections() async {
  try {
    await sentiance.enableDetections();
    print("Detections are now enabled.");
  } on EnableDetectionsError catch (e) {
    print('Failed to enable detections, reason: ${e.reason}');
  } catch (e) {
    print(e);
  }
}
```

{% endcode %}

{% hint style="info" %}
**Enabling Detections Is Persistent**

When you enable detections, the SDK will remember this and automatically enable them the next time the app restart. Therefore, you do not need to enable them every time. You only need to make sure that you are properly initializing the SDK during every app startup.
{% 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://docs.sentiance.com/a-complete-integration/flutter-quick-start/enabling-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.
