# 05. Flutter-Plugin Guide

## 개발 버전 <a href="#undefined" id="undefined"></a>

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Flutter</strong></td><td>3.29.0</td><td></td></tr><tr><td><strong>Java SDK (Java 11)</strong></td><td>ONE AdMax SDK v1.2.3</td><td></td></tr></tbody></table>

## APP key 발급 및 적용하기 <a href="#app-key" id="app-key"></a>

앱키를 발급 후 Flutter Android Module의 `AndroidManifest.xml`에 `<meta-data/>`를 설정합니다.&#x20;

```java
<manifest>
    ...
    <application>
        ...
        
        <meta-data android:name="com.oneadmax.global.appkey" android:value="your app key"/>
    </application>
</manifest>
```

## SDK Initialize

광고를 로드하기 전에 앱이 ONEAdMax를 초기화해야 합니다. \
`ONEAdMax.initialize()` 초기화는 최초 한 번만 수행해야 합니다.

```java
class _OneAdDemo extends ConsumerState<HomeDetailScreen> {

  @override
  Widget build(BuildContext context) {
    ONEAdMax.initialize((bool isSuccess) {});
  }
}
```

## 어플리케이션 종료 <a href="#undefined-1" id="undefined-1"></a>

애플리케이션이 종료될 때 메모리에 할당된 리소스( View, Memory )를 해제합니다.

```java
ONEAdMax.dispose();
```

## 로그 설정 <a href="#undefined-2" id="undefined-2"></a>

개발을 위해 ONEAdMax의 자세한 로그를 노출할 수 있습니다. (기본값: false)

```java
ONEAdMax.setLogEnable(true);
```

## GDPR 설정 <a href="#gdpr" id="gdpr"></a>

EU의 GDPR (General Data protection Regulation) 법안에 대응하기 위해 아래 API를 추가합니다. GDPR 동의가 필요한 유저에 한해 아래 API를 호출하시기를 바랍니다. (기본값: true)

```java
ONEAdMax.gdprConsentAvailable(true);
```

## COPPA 설정 <a href="#coppa" id="coppa"></a>

COPPA(Children's Online Privacy Protection Rule)법안에 대응하기 위해 아래 API를 추가합니다. 해당 디바이스에서는 모든 광고 타입의 광고 요청에 대해 No ad 처리됩니다. (기본값: false)

```java
ONEAdMax.tagForChildDirectedTreatment(false)
```

## 광고 형식 선택하기 <a href="#undefined-3" id="undefined-3"></a>

### Reward Video ADs

보상을 제공하는 비디오 광고입니다.\
비디오 광고 종료 시 Complete event callback으로 광고 참여 완료 정보를 전달합니다.

{% content-ref url="/pages/z0CkuVWZ7wgVGwjivoc0" %}
[5-1. 보상형 비디오 광고 for Flutter](/one-admax-sdk/05.-flutter-plugin-guide/5-1.-for-flutter.md)
{% endcontent-ref %}

### Interstitial ADs

&#x20;앱의 화면 전체를 덮는 광고입니다.\
완료되었거나 유저에 의해 중단 되었을 경우 앱의 화면으로 전환됩니다.

{% content-ref url="/pages/Z1qCcv2wrVaZUCUXLuDm" %}
[5-2. 전면 광고 for Flutter](/one-admax-sdk/05.-flutter-plugin-guide/interstitial.md)
{% endcontent-ref %}

### Banner ADs

앱의 일부를 차지하는 직사각형 광고를 표시합니다.\
위치를 설정하고 시간을 설정하여 자동으로 새로고침할 수 있습니다.

{% content-ref url="/pages/3fFmJwLtunHa9t6jTtb4" %}
[5-3. 배너 광고 구현하기](/one-admax-sdk/05.-flutter-plugin-guide/5-3..md)
{% endcontent-ref %}

### Interstitial Video ADs (Non Reward)

비디오 광고와 형태는 동일하지만 리워드가 제공되지 않는 광고 타입입니다.

{% content-ref url="/pages/VfwRQBnEnNiplxZGPsB7" %}
[5-4. 전면 비디오 광고 for Flutter (비보상형)](/one-admax-sdk/05.-flutter-plugin-guide/5-4.-for-flutter.md)
{% endcontent-ref %}


---

# 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://one-admax-organization.gitbook.io/one-admax-sdk/05.-flutter-plugin-guide.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.
