> For the complete documentation index, see [llms.txt](https://aatkit.gitbook.io/android-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aatkit.gitbook.io/android-integration/start/consent/simple-consent.md).

# Simple Consent

### Introduction

{% hint style="info" %}
Nowadays, using a Simple Consent management is no longer recommended. Please consider using an industry standard consent management such as the [IAB Transparency & Consent Framework](https://iabeurope.eu/transparency-consent-framework/) and connecting it via Managed or Vendor Consent.
{% endhint %}

To set if the user has given or withheld consent for the collection and use of personal data (used for non-IAB partners), use the [SimpleConsent](https://gravite-sdk-releases.s3.eu-central-1.amazonaws.com/aatkit/android/docs/-a-a-t-kit/com.intentsoftware.addapptr/-simple-consent/index.html) default initializer and pass any value of the [NonIABConsent](https://gravite-sdk-releases.s3.eu-central-1.amazonaws.com/aatkit/android/docs/-a-a-t-kit/com.intentsoftware.addapptr/-non-i-a-b-consent/index.html) enum

* `OBTAINED` if the user has given consent.
* `WITHHELD` if the user has declined.
* `UNKNOWN` if the user has not set a preference.

If `SimpleConsent` is used, AATKit will automatically read the IAB consent string stored (by third-party CMP) in SharedPreferences (if available) and respect the settings for Gravite.

### Usage

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

```java
private void configureAATKit() {
    AATKitConfiguration configuration = new AATKitConfiguration(this);
    ...
    Consent consent = new SimpleConsent(NonIABConsent.OBTAINED);
    configuration.setConsent(consent);
    ...
    AATKit.init(configuration);
}
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
private fun configureAATKit() {
    val configuration = AATKitConfiguration(this)
    ...
    val consent: Consent = SimpleConsent(NonIABConsent.OBTAINED)
    configuration.consent = consent
    ...
    AATKit.init(configuration)
}
```

{% endtab %}
{% endtabs %}
