> 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/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 초기화  <a href="#sdk" id="sdk"></a>

* 광고를 로드 하기 전에 앱에서 `initialize` 를 호출하여 `ADX Android SDK`를 초기화합니다. 이 작업은 앱 실행 시 한 번만 처리하면 됩니다.
* `ADXConfiguration` 객체 생성 시, `setAppId()` 메서드 파라미터에 발급 받은 `ADX APP ID` 값을 입력하고, `setGdprType()` 메서드 파라미터는 `DIRECT_NOT_REQUIRED` 또는 `POPUP_LOCATION` 를 사용 하십시오.

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

```java
// ADXConfiguration 객체 생성
  // EEA 지역에서 서비스 계획이 있는 경우 "POPUP_LOCATION" 사용
  // EEA 지역에서 서비스 계획이 없는 경우 "DIRECT_NOT_REQUIRED" 사용
ADXConfiguration adxConfiguration = new ADXConfiguration.Builder()
        .setAppId("<ADX_APP_ID>")
        .setGdprType(ADXConfiguration.GdprType.POPUP_LOCATION)
        .build();
        
// ADX SDK 초기화 시도
ADXSdk.getInstance().initialize((Activity) this, 
        adxConfiguration, 
        new ADXSdk.OnInitializedListener() {
        @Override
        public void onCompleted(boolean result, ADXGDPR.ADXConsentState adxConsentState) {
                // 초기화 완료 콜백 수신 후, 광고 로드
        }
});
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
// ADXConfiguration 객체 생성
  // EEA 지역에서 서비스 계획이 있는 경우 "POPUP_LOCATION" 사용
  // EEA 지역에서 서비스 계획이 없는 경우 "DIRECT_NOT_REQUIRED" 사용
val adxConfiguration = ADXConfiguration.Builder()
    .setAppId("<ADX_APP_ID>")
    .setGdprType(ADXConfiguration.GdprType.POPUP_LOCATION)
    .build()
    
// ADX SDK 초기화 시도
ADXSdk.getInstance().initialize(this as Activity, adxConfiguration) { result, adxConsentState ->
    // 초기화 완료 콜백 수신 후, 광고 로드
}
```

{% endtab %}
{% endtabs %}
