๐Ÿ—‚๏ธ
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
  • Create an Interstitial Video Ads instance
  • Interstitial Video Ads PLACEMENT ID
  • Interstitial Video Ads network schedule timeout
  • Interstitial Video Ads request
  • Interstitial Video Ads display
  • Specify the Activity for displaying Interstitial Video Ads
  • Check if the Interstitial Video Ads have been loaded
  • Interstitial Video Ads event listener
  • Interstitial Video Ad Sample Code
  1. 03. SDK for Java

3-4. Interstitial Video Ads (Non Reward)

It is an ad type that is similar to video ads but does not offer rewards.

Create an Interstitial Video Ads instance

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

Interstitial Video Ads PLACEMENT ID

Add the following code to set the PLACEMENT ID for the Interstitial Video Ads. The PLACEMENT ID for Interstitial Video Ads can be generated in the ONE AdMax console.

interstitialVideo.setPlacementId( PLACEMENT_ID );

Interstitial Video Ads network schedule timeout

When loading Interstitial Video Ads, a timeout is set for each network (mediation partner). If an ad is not received within the specified time, it will move on to the next network.

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

Interstitial Video Ads request

interstitialVideo.load();

Excessive calls to the load() API will result in a block.

Interstitial Video Ads display

interstitialVideo.show();

Specify the Activity for displaying Interstitial Video Ads

This is used when displaying Interstitial Video Ads in an activity different from the one where the load() API was called.

interstitialVideo.setCurrentActivity( activity );

Check if the Interstitial Video Ads have been loaded

This is called to check whether the Interstitial Video Ads have been loaded or not.

interstitialVideo.isLoaded();

Interstitial Video Ads event listener

Set up listeners for events that occur when loading Interstitial Video Ads.

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

Interstitial Video Ad Sample Code

private OAMInterstitalVideo interstitialVideo;
 
@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.");      
                    initInterstitialVideo( yourInterstitialViceoPlacementID );
            }
        });
    }
 
    ...
}
 
 
public void initInterstitialVideo( String youtPlacementId ){
    interstitialVideo = new OAMInterstitalVideo( this );
 
    // placementID๋Š” ํ•„์ˆ˜์ž…๋‹ˆ๋‹ค.
    interstitialVideo.setPlacementId( youtPlacementId );
 
    // optional   
    interstitialVideo.setNetworkScheduleTimeout( 10 ); 
 
    // listener๋ฅผ ๋“ฑ๋กํ•˜์ง€ ์•Š์œผ๋ฉด ์ด๋ฒคํŠธ๋ฅผ ๋ฐ›์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
    interstitialVideo.setEventListener( new IOAMInterstitialVideoEventListener(){
        @Override
        public void onLoaded(){                         // ์ „๋ฉด ๋น„๋””์˜ค ๊ด‘๊ณ  loading ์„ฑ๊ณต
            Log.d( Tag, "interstitalVideo load success" );
            // loading ์„ฑ๊ณต ์ดํ›„, showing.
            interstitialVideo.show();
        }
 
        @Override
        public void onLoadFailed( OAMError error ){     // ์ „๋ฉด ๋น„๋””์˜ค ๊ด‘๊ณ  loading ์‹คํŒจ
          Log.d( Tag, "interstitalVideo load failed " + error.toString() );
        }
 
        @Override
        public void onOpened(){                         // ์ „๋ฉด ๋น„๋””์˜ค ๊ด‘๊ณ  open ์„ฑ๊ณต
            Log.d( Tag, "interstitalVideo open success" );
        }
 
        @Override
        public void onOpenFailed( OAMError error ){     // ์ „๋ฉด ๋น„๋””์˜ค ๊ด‘๊ณ  open ์‹คํŒจ
          Log.d( Tag, "interstitalVideo open failed " + error.toString() );
        }
     
        @Override
        public void onClosed(){                         // ์ „๋ฉด ๋น„๋””์˜ค ๊ด‘๊ณ  ์ข…๋ฃŒ
            Log.d( Tag, "interstitalVideo closed " + event );
        }
 
        @Override
        public void onClicked(){                        // ์ „๋ฉด ๋น„๋””์˜ค ๊ด‘๊ณ  ํด๋ฆญ
            Log.d( Tag, "interstitalVideo clicked" );
        }
    } );
 
    interstitalVideo.load();
}
 
 
 
@Override
protected void onDestroy(){
    super.onDestroy();
    ONEAdMax.unInit();
}
Previous3-3. Banner AdsNext04. Unity-Plugin Guide

Last updated 4 months ago

ONE AdMax SDK Error Codes