> For the complete documentation index, see [llms.txt](https://platform-business.gitbook.io/adx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform-business.gitbook.io/adx/en/android/sdk-integration/initialize.md). Agents can also search and read this documentation through its [MCP server](https://platform-business.gitbook.io/adx/~gitbook/mcp).

# Initialize

### SDK Initialize <a href="#sdk-initialize" id="sdk-initialize"></a>

* Before loading ads, initialize the ADX Android SDK by calling `initialize`. This process only needs to be performed once when the app launches.
* When creating the `ADXConfiguration` object, pass your issued ADX APP ID into the `setAppId()` method parameter. For the `setGdprType()` method parameter, use either `DIRECT_NOT_REQUIRED` or `POPUP_LOCATION`.

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

```java
// Create ADXConfiguration object
  // Use "POPUP_LOCATION" if you plan to service in the EEA region
  // Use "DIRECT_NOT_REQUIRED" if you do not plan to service in the EEA region
ADXConfiguration adxConfiguration = new ADXConfiguration.Builder()
                        .setAppId("<ADX_APP_ID>")
                        .setGdprType(ADXConfiguration.GdprType.POPUP_LOCATION)
                        .build();

// Attempt to initialize ADX SDK
ADXSdk.getInstance().initialize((Activity) this, adxConfiguration, new ADXSdk.OnInitializedListener() {
        @Override
        public void onCompleted(boolean result, ADXGDPR.ADXConsentState adxConsentState) {
          // Load ads after receiving the initialization completed callback
        }
});
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
// Create ADXConfiguration object
  // Use "POPUP_LOCATION" if you plan to service in the EEA region
  // Use "DIRECT_NOT_REQUIRED" if you do not plan to service in the EEA region
val adxConfiguration = ADXConfiguration.Builder()
    .setAppId("<ADX_APP_ID>")
    .setGdprType(ADXConfiguration.GdprType.POPUP_LOCATION)
    .build()
    
// Attempt to initialize ADX SDK
ADXSdk.getInstance().initialize(this as Activity, adxConfiguration) { result, adxConsentState ->
    // Load ads after receiving the initialization completed callback
}
```

{% endtab %}
{% endtabs %}
