Reward Video Ad奖励视频

Vungle的奖励广告是全屏视频广告。在播放完毕广告后,会自动跳转到落地页。在落地页用户可点击跳转到商店下载广告应用或游戏。

请求广告


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

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

播放广告


if (Vungle.canPlayAd("YOUR_REWARD_Placement_reference_id")) {
    AdConfig adConfig = new AdConfig();
    // 静音播放
    // adConfig.setMuted(true); 
    // 自动控制广告方向
    // adConfig.setAdOrientation(AdConfig.AUTO_ROTATE) // AdConfig.PORTRAIT, AdConfig.LANDSCAPE

    Vungle.playAd("YOUR_REWARD_Placement_reference_id", adConfig, new PlayAdCallback() {
        @Override
        public void onAdStart(String id) { 
            // Ad experience started
        }

        @Override
        public void onAdEnd(String id) {
            // Ad experience ended
        }

        @Override
        public void onAdClick(String id) {
            // User clicked on ad
        }

        @Override
        public void onAdRewarded(String id) {
            // User earned reward for watching an ad
        }

        @Override
        public void onAdLeftApplication(String id) {
            // User has left app during an ad experience
        }

        @Override
        public void onError(String id, VungleException exception) { 
            // Ad failed to play
        }
    });
}
Powered by Creativity Driven by Performance Sign Up Here

Questions?

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

这篇文章有帮助吗?