05. Flutter-Plugin Guide

Development environment

Flutter

3.22.3

Java SDK (JAva 11)

ONEAdMax : v1.2.1

Issue and apply the APP key.

After issuing the app key, configure the <meta-data/> in the AndroidManifest.xml of the Flutter Android Module.

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

SDK Initialize

The app must initialize ONEAdMax before loading ads. ONEAdMax.initialize() should be executed only once during the initial setup.

class _OneAdDemo extends ConsumerState<HomeDetailScreen> {

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

Handle the process when the application is closed.

Release the resources (View, Memory) allocated in memory when the application is closed.

ONEAdMax.dispose();

Set up logging.

You can expose detailed logs for ONEAdMax during development. (Default: false)

ONEAdMax.setLogEnable(true);

Set up GDPR (General Data Protection Regulation)

To comply with the EU's GDPR (General Data Protection Regulation), add the following API. Please call this API only for users who require GDPR consent. (Default: true)

ONEAdMax.gdprConsentAvailable(true);

Set up COPPA

To comply with the COPPA (Children's Online Privacy Protection Act), add the following API. For the devices where this is set, all ad requests for any ad type will be treated as "No ad." (Default: false)

ONEAdMax.tagForChildDirectedTreatment(false)

Choose ad format

Rewarded Video ADs

This is a reward-based video ad. When the video ad finishes, the completion information is sent via the Complete event callback.

5-1. 보상형 비디오 광고 for Flutter

Interstitial ADs

This is an ad that covers the entire screen of the app. Once completed or interrupted by the user, the app's screen will be displayed.

5-2. 전면 광고 for Flutter

This displays a rectangular ad that occupies part of the app's screen. You can set the position and time to automatically refresh the ad.

5-3. 배너 광고 구현하기

Interstitial Video ADs (Non Reward)

This is an ad type similar to video ads, but without offering rewards.

5-4. 전면 비디오 광고 for Flutter (비보상형)

Last updated