# Control Sending Data

The Sentiance SDK optimizes under which circumstances data submission occurs, to optimize network and battery usage.

For certain users with specific usage patterns (e.g. someone who rarely connects to Wi-Fi), it could take a long time before detections are finally submitted.

If you want to override the default behavior, you can initiate a forced submission of detections. Ideally, you use this method only after explaining to the user that your app will consume more bandwidth in case the device is not connected to Wi-Fi.

In order to know when it makes sense to do this, you can check the disk, mobile network and WiFi quotas of the [`SdkStatus`](/important-topics/sdk/api-reference/android/sdkstatus.md) and [`SENTSdkStatus`](https://github.com/sentiance/v4-docs/blob/main/important-topics/sdk/appendix/broken-reference/README.md) objects.

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

```objectivec
Sentiance.shared.submitDetections { result, error in 
    guard let result = result else {
        // Error
        print("Error: \(error!.failureReason)")
        return 
    }
    
    // Successfully submitted
}
```

{% endtab %}

{% tab title="Android" %}

```kotlin
sentiance.submitDetections().addOnCompleteListener { operation ->
    if (operation.isSuccessful) {
        Log.d(TAG, "Detections submitted successfully.")
    } els
        val error = operation.error
        Log.e(TAG, "submitDetections failed with reason ${error.reason.name}.")
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
[SubmitDetectionsResult](/important-topics/sdk/api-reference/android/submitdetectionsresult.md) is an empty object at this time. A non-nil result object signifies successful submission.
{% 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/important-topics/sdk/appendix/control-sending-data.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.
