# SentianceOptions.Builder

Builder class for SentianceOptions.

## SentianceOptions.Builder API

### `Builder`

> ```java
> Builder(Context context)
> ```
>
> Creates a builder object used for initializing the Sentiance SDK.

### `setNotification`

> ```java
> Builder setNotification(@NonNull Notification notification, int notificationId)
> ```
>
> Sets the notification that the SDK will show when running in the background, along with the notification ID. These are passed to Android's [`startForeground`](https://developer.android.com/reference/android/app/Service#startForeground\(int,%20android.app.Notification\)) method when starting a foreground service.

### `collectAppSessionData()`

> ```java
> Builder collectAppSessionData()
> ```
>
> Sets whether app session data collection is enabled. By default, it is disabled.
>
> If enabled, the SDK may collect additional sensor and location data when the app is in the foreground (i.e visible to the user). This data may get uploaded to the Sentiance Platform.

### `disableIncorrectInitializationNotification()`

> ```java
> Builder disableIncorrectInitializationNotification()
> ```
>
> On debug builds of your app, the SDK will show a notification when it detects an incorrect SDK initialization. Use this method to disable the notification.

### `diagnostics`

> ```java
> Builder diagnostics(@NonNull SdkDiagnostics diagnostics)
> ```
>
> Sets [SDK diagnostics](/important-topics/sdk/api-reference/android/sdkdiagnostics.md) observers used to receive internal SDK diagnostic events (for example service lifecycle changes, location requests to Google Play Services) during runtime.
>
> This is optional. If not set, no diagnostics observers are registered.

### `build()`

> ```java
> SentianceOptions build()
> ```
>
> Builds an `SentianceOptions` object.


---

# 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/api-reference/android/sentianceoptions/sentianceoptions.builder.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.
