🗂️
ONE AdMax Developer Guides
EN
EN
  • 00. about ONE AdMax
  • 01. How to Issue a Media Key
  • 02. How to Issue a Placement Key
  • 03. SDK for Java
    • 3-1. Rewarded Video Ads
    • 3-2. Interstitial Ads
    • 3-3. Banner Ads
    • 3-4. Interstitial Video Ads (Non Reward)
  • 04. Unity-Plugin Guide
    • 4-1. Rewarded Video Ads for Unity
    • 4-2. Interstitial Ads for Unity
    • 4-3. Banner Ads for Unity
    • 4-4. Interstitial Video Ads for Unity (Non Reward)
  • 05. Flutter-Plugin Guide
    • 5-1. 보상형 비디오 광고 for Flutter
    • 5-2. 전면 광고 for Flutter
    • 5-3. 배너 광고 구현하기
    • 5-4. 전면 비디오 광고 for Flutter (비보상형)
  • 📌Starting Mediation
  • ONE AdMax SDK Error Codes
  • SDK Version 안내 사항
    • SDK 1.2.0
    • SDK 1.0.2
Powered by GitBook
On this page
  • SDK Installation
  • Maven Settings
  • Dependency Settings
  • Permission Settings
  • ONE AdMax SDK
  • Media Key Registration
  • SDK Initialize
  • onDestroy() API
  • Log Settings
  • GDPR Settings
  • COPPA Settings

03. SDK for Java

SDK Installation

You can configure the SDK using Gradle.

Maven Settings

Add the following Maven repository to the project-level build.gradle

repositories {
    google()
    mavenCentral()
 
    maven{
        url "https://repo.onestore.co.kr/repository/onestore-sdk-public"
    }
}

Dependency Settings

Add the following dependency to the app-level build.gradle

dependencies {
    ...
    implementation 'com.oneadmax.sdk:sdk-ads:1.2.1'
    ...
}

Permission Settings

The following required permissions must be added to the Android Manifest:

<manifest>
...
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
...
</manifest>

ONE AdMax SDK

Media Key Registration

Add the media key issued from the ONE AdMax console within the application tag of the Android Manifest.

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

SDK Initialize

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate( savedInstanceState );
    ...
     
    if( ONEAdMax.isInit( MyActivity.this ) == false ){
        ONEAdMax.init( MyActivity.this, new IOAMInitListener() {
            @Override
            public void onInitialized() {
                Log.d( Tag, "ONEAdMax SDK Initialized.");
            }
        });
    }
    ...
}

onDestroy() API

Release the resources (View, Memory) allocated in memory when the application is terminated. This should be called in the onDestroy() method of the activity that is being terminated.

@Override
protected void onDestroy() {
    // TODO Auto-generated method stub 
    super.onDestroy();  
     
    ...
 
    ONEAdMax.unInit();
}

Log Settings

You can enable or disable the logs for the ONE AdMax SDK.

ONEAdMax.setLogEnable( true ); // default false

GDPR Settings

To comply with the EU's GDPR (General Data Protection Regulation) regulation, the following API is used. It is called only for users who need to provide GDPR consent.

ONEAdMax.gdprConsentAvailable( false ); // Default : true

COPPA Settings

ONEAdMaxClient.tagForChildDirectedTreatment(false);
Previous02. How to Issue a Placement KeyNext3-1. Rewarded Video Ads

Last updated 16 days ago

To comply with the COPPA (), the following API is added. For devices that fall under COPPA, all types of ad requests will be treated as "No ad" (default: false).

Children's Online Privacy Protection Rule