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.

Last updated