Interstitial插屏

插屏广告属于全屏广告。一般在关卡过渡,应用开始等节点出现。一般来说插屏广告,用户可选择关闭,并在关闭后返回应用。Vungle插屏的广告素材与奖励广告是相同的。插屏与奖励广告取决于传入参数placement reference id在dashboard上的类型。

请求广告

SDK发送广告请求,在服务器给填充后开始缓存视频广告素材。


// Load Ad Implementation
if (Vungle.isInitialized()) {
    Vungle.loadAd("YOUR_INTERSTITIAL_PLACEMENT_REFERENCE_ID", new LoadAdCallback() {
        @Override
        public void onAdLoad(String placementReferenceId) { }

        @Override
        public void onError(String placementReferenceId, Throwable throwable) {
            // Load ad error occurred - throwable.getLocalizedMessage() contains error message
        }
    });
}

播放广告


if (Vungle.canPlayAd("YOUR_INTERSTITIAL_PLACEMENT_REFERENCE_ID")) {
    AdConfig adConfig = new AdConfig();
    // Mute
    // adConfig.setMuted(true); 
    // Set Oritation
    // adConfig.setAutoRotate(true);

    Vungle.playAd("YOUR_INTERSTITIAL_PLACEMENT_REFERENCE_ID", adConfig, new PlayAdCallback() {
        @Override
        public void onAdStart(String placementReferenceId) { }

        @Override
        public void onAdEnd(String placementReferenceId, boolean completed, boolean isCTAClicked) { 
            // Load Next ad
        }
        
        @Override
        public void onError(String placementReferenceId, Throwable throwable) {
            // Play ad error occurred - throwable.getLocalizedMessage() contains error message
        }
    });
}
这篇文章有帮助吗?

Questions?

Need further assistance, feel free to reach out to us, we’re here to help!