๐Ÿ—‚๏ธ
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
  • UserID Settings
  • Creating a Rewarded Video Ad Instance
  • Setting the Rewarded Video Ad Placement ID
  • Setting the Network Timeout for Rewarded Video Ad Request
  • Reward Video Load
  • Reward Video Show
  • Call the CS page.
  • Mediation Settings
  1. 03. SDK for Java

3-1. Rewarded Video Ads

This is a video ad that rewards the user after they complete watching the video. Upon completion of the ad, the "Complete" event callback will be triggered to send the information of ad participation.

UserID Settings

It is used to identify the user for rewarding them upon completion of the rewarded video.

ONEAdMax.setUserId( context, UserID );
  • Each user must have a unique user identifier, which should not be a variable value.

  • It must not include personal information such as email, name, phone number, or identifiable user IDs.

  • If it contains Korean characters, special characters, or spaces, it must be URL encoded before use.

  • The user identifier must be set before the user enters the ad.

Creating a Rewarded Video Ad Instance

private OAMRewardVideo  rewardVideo;
 
@Override
protected void onCreate(Bundle savedInstanceState) {
    ...
 
    rewardVideo = new OAMRewardVideo( this );
}

Setting the Rewarded Video Ad Placement ID

Make sure to replace "your_placement_id" with the actual placement ID you received from the ONE AdMax console.

rewardVideo.setPlacementId( PLACEMENT_ID );

Setting the Network Timeout for Rewarded Video Ad Request

Set the network timeout for the rewarded video ad request. When loading the rewarded video ad, a timeout is given for each ad network (mediation provider). If the ad is not received within the specified timeout, the request will move on to the next ad network.

rewardVideo.setNetworkScheduleTimeout( 10 ); // default 10 sec

Reward Video Load

You can request the rewarded video ad from the server by calling the Load() API.

rewardVideo.load();

Excessive calls to the load() API may result in being blocked.

Reward Video Show

Once the ad loading is complete, you can display the ad by calling the show() API at the desired point in your application:

rewardVideo.show();

To specify the Activity for displaying the rewarded video ad, you need to set it when calling the show() method.

rewardVideo.setCurrentActivity( activity );

To check whether the rewarded video ad has been successfully loaded, you can use the following method:

rewardVideo.isLoaded();

To set up an event listener for the rewarded video ad, you can use the following approach:

rewardVideo.setEventListener( new IOAMRewardVideoEventListener(){
    @Override
    public void onLoaded(){                         // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  loading ์„ฑ๊ณต
        Log.d( Tag, "rewardVideo load success" );
    }
 
    @Override
    public void onLoadFailed( OAMError error ){     // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  loading ์‹คํŒจ
        Log.d( Tag, "rewardVideo load failed " + error.toString() );
    }
 
    @Override
    public void onOpened(){                         // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  open ์„ฑ๊ณต
        Log.d( Tag, "rewardVideo open success" );
    }
 
    @Override
    public void onOpenFailed( OAMError error ){     // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  open ์‹คํŒจ
        Log.d( Tag, "rewardVideo open failed " + error.toString() );
    }
 
    @Override
    public void onClosed(){                         // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  ์ข…๋ฃŒ
        Log.d( Tag, "rewardVideo closed " + event );
    }
 
    @Override
    public void onClicked(){                        // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  ํด๋ฆญ. ์ผ๋ถ€ ๋ฏธ๋””์—์ด์…˜ ๊ด‘๊ณ ๋Š” ์ง€์› ์•ˆํ•จ
        Log.d( Tag, "rewardVideo clicked" );
    }
 
    @Override
    public void onCompleted( int adNetworkNo, boolean completed ){ // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  ์™„๋ฃŒ. on completed ์—์„œ completed ๊ฐ€ true ์ผ ๋•Œ๋งŒ ๋ฆฌ์›Œ๋“œ ์ง€๊ธ‰
        Log.d( Tag, "rewardVideo  completed " + completed  );
    }
 
} );

Call the CS page.

This is the API to call the rewarded video ad CS page. You need to pass the Activity context in order for the page to be displayed correctly.

ONEAdMax.openRewardVideoCSPage( Activity activity, String userID )

Hereโ€™s a sample code for integrating a rewarded video ad in your app:

private OAMRewardVideo rewardVideo;
 
@Override
protected void onCreate( Bundle savedInstanceState ){
    super.onCreate( savedInstanceState );
    ...
     
    // ONEAdMax ๋กœ๊ทธ ํ™œ์„ฑํ™”. apk release์‹œ์—๋Š” ์‚ญ์ œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
    ONEAdMax.setLogEnable( true );
 
    //ONEAdMax SDK ์ดˆ๊ธฐํ™”
    if( ONEAdMax.isInit( MyActivity.this ) == false ){
        ONEAdMax.init( MyActivity.this, new IOAMInitListener() {
            @Override
            public void onInitialized() {
                Log.d( Tag, "ONEAdMax SDK Initialized.");      
                initRewardVideo( yourRewardPlacementID );
            }
        });
    }
 
    ...
}
 
 
public void initRewardVideo( String yourPlacementId ){
    rewardVideo = new  OAMRewardVideo( this );
 
    // placementID๋Š” ํ•„์ˆ˜์ž…๋‹ˆ๋‹ค.
    rewardVideo.setPlacementId( yourPlacementId );
 
    // optional   
    rewardVideo.setNetworkScheduleTimeout( 10 ); 
 
    // listener๋ฅผ ๋“ฑ๋กํ•˜์ง€ ์•Š์œผ๋ฉด ์ด๋ฒคํŠธ๋ฅผ ๋ฐ›์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
    rewardVideo.setEventListener( new IOAMRewardVideoEventListener(){
        @Override
        public void onLoaded(){                         // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  loading ์„ฑ๊ณต
            Log.d( Tag, "rewardVideo load success" );
            // loading ์„ฑ๊ณต ์ดํ›„, showing.
            rewatdVideo.show();
        }
 
        @Override
        public void onLoadFailed( OAMError error ){     // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  loading ์‹คํŒจ
          Log.d( Tag, "rewardVideo load failed " + error.toString() );
        }
 
        @Override
        public void onOpened(){                         // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  open ์„ฑ๊ณต
            Log.d( Tag, "rewardVideo open success" );
        }
 
        @Override
        public void onOpenFailed( OAMError error ){     // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  open ์‹คํŒจ
          Log.d( Tag, "rewardVideo open failed " + error.toString() );
        }
     
        @Override
        public void onClosed(){                         // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  ์ข…๋ฃŒ
            Log.d( Tag, "rewardVideo closed " + event );
        }
 
        @Override
        public void onClicked(){                        // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  ํด๋ฆญ. ์ผ๋ถ€ ๋ฏธ๋””์—์ด์…˜ ๊ด‘๊ณ ๋Š” ์ง€์› ์•ˆํ•จ
            Log.d( Tag, "rewardVideo clicked" );
        }
 
        @Override
        public void onCompleted( int adNetworkNo, boolean completed ){ // ๋ฆฌ์›Œ๋“œ ๋น„๋””์˜ค ๊ด‘๊ณ  ์™„๋ฃŒ
            Log.d( Tag, "rewardVideo completed. " + completed );
        } 
    } );
 
    rewardVideo.load();
}
 
 
 
@Override
protected void onDestroy(){
    super.onDestroy();
    ONEAdMax.unInit();
}

Mediation Settings

For stable fill rate and eCPM, it is recommended to integrate mediation with AppLovin, Unity Ads, and Vungle. These networks can help maximize ad revenue by providing a broad range of ad inventory, improving ad fill rates, and optimizing eCPM.

Previous03. SDK for JavaNext3-2. Interstitial Ads

Last updated 4 months ago

ONE AdMax SDK Error Codes
๐Ÿ“ŒStarting Mediation