# Automatic data collection

By default, the Batch SDK will automatically collect some data related to the user's device:

<table><thead><tr><th width="164.21875">Native data</th><th>Description</th><th width="224.3515625" align="right">Default collection status</th><th width="160.890625" data-type="checkbox">Installation based data model</th><th data-type="checkbox">Profile based data model</th></tr></thead><tbody><tr><td>Device Model</td><td>The user's device model information</td><td align="right">false</td><td>true</td><td>false</td></tr><tr><td>Installation ID</td><td>The installation identifier</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Session ID</td><td>The user's session identifier</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>Custom User ID</td><td>The user's custom identifier</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>API Level</td><td>The Batch SDK api level</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Messaging API Level</td><td>The Batch SDK Messaging api level</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Device Language</td><td>The user's device language</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Device Region</td><td>The user's device region</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Device Timezone</td><td>The user's device timezone</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>OS Version</td><td>The user's device iOS version</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>App Version (String)</td><td>The application version (string)</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>App Version (Build Number)</td><td>The application version (number)</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>Bundle Name</td><td>The application bundle identifier</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>Device Date</td><td>The current device date</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>Device Installation Date</td><td>The Batch installation date</td><td align="right">true</td><td>true</td><td>true</td></tr><tr><td>Bridge Version</td><td>Version of the batch bridge (for cross-platform plugin only)</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>Plugin Version</td><td>Version of the batch plugin (for cross-platform plugin only)</td><td align="right">true</td><td>true</td><td>false</td></tr><tr><td>GeoIP</td><td>Whether Batch should resolve the user's location from ip address.</td><td align="right">false</td><td>true</td><td>false</td></tr></tbody></table>

Some of this data are disabled by default and can be toggled on/off according to the user consent:

* Device model
* Device brand
* GeoIP

Use the following API to fine-tune what you want to enable:

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

```kotlin
Batch.updateAutomaticDataCollection {
  it.apply {
    setGeoIPEnabled(true) // Enable GeoIP resolution on server side
    setDeviceBrandEnabled(true) // Enable automatic collection of the device brand information
    setDeviceModelEnabled(true) // Enable automatic collection of the device model information
  }
}
```

{% endtab %}

{% tab title="Java" %}

```java
Batch.updateAutomaticDataCollection(config -> {
    config.setGeoIPEnabled(true) // Enable GeoIP resolution on server side
          .setDeviceBrandEnabled(true) // Enable automatic collection of the device brand information
          .setDeviceModelEnabled(true); // Enable automatic collection of the device model information
});
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
This API can be used at any time in your application lifecycle and Batch will remember these values, even if your Application reboots.
{% 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://doc.batch.com/developer/sdk/android/data-privacy/data-collection.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.
