Get Started with Avocarrot

Overview

Examples

Android

Overview

- Avocarrot Exchange SDK

Setup Exchange SDK

Stream

Native Assets

Exchange Troubleshooting

- Avocarrot Mediation SDK

Setup Mediation

Stream Ads Mediation

Native ads Mediation

Native Assets Mediation

Banner Mediation

Interstitial Mediation

Video Mediation

Supported Networks & Ad Types

Mediation Troubleshooting

iOS

Overview

- Avocarrot Exchange SDK

Setup SDK

Stream

Native Assets

Exchange Troubleshooting

- Avocarrot Mediation

Getting Started With Mediation

Stream Ads Mediation

Native Ads Mediation

Banner Ads Mediation

Interstitial Ads Mediation

Video Ads Mediation

Supported Networks & Ad Types

Mediation Troubleshooting

API Documentation

Reporting API

Help

FAQ

Updates

SDK Change Log

Android Change Log

iOS Change Log

Video Mediation

Updated 7 days ago ​by Derek Lim

Overview

This tutorial helps you setup video ads mediation.

Prerequisites

You need an Avocarrot account to complete the tutorial. Create an account
You need to setup the Mediation SDK. Setup Mediation SDK

Setup Video Ads Mediation

All SDK method calls should be done from the main thread (Main thread, UI thread).

ID of advertising space for testing : "032c0809-0335-4e98-8f8c-8e522f291d0f"

The ID above is meant for testing purpose only, please replace it with the Ad unit Id of your placement on dashboard.
  1. Add the following code to your activity:


    VideoAd videoAd = VideoAdPool.load(this, "YOUR_VIDEO_AD_UNIT_ID", closeButtonEnabled, 
    videoAdListener);

    The Close button for video ads is supported for some networks. You can enable or disable it by changing closeButtonEnabledparameter.

    If you call reloadAd() before the video has started to show, new request processing is cancelled. Only one request will be processed.

    When the video download is completed, you can display it by calling the showAd() method.


    videoAd.showAd();
    To learn about download completion, subscribe to video banner events (see Ad Events Handling) or call method isReady().


    videoAd.isReady();

    Activity lifecycle events handling

    onDestroy() method should be called depending on the activity lifecycle events.

    Example:
    @Override
    protected void onDestroy() {
        super.onDestroy();
        videoAd.onActivityDestroyed();
    }
    
  2. Congratulations! Compile and Run your project. You can now further customize your Video ads.

Advanced Customization

Test mode (development mode)

Go Live!

  1. Remove sandbox If you have received a sample ad then simply disable the Sandbox mode by including the following instruction in your code:
    AvocarrotSDK.setTestMode(false);
    You should disable Sandbox mode ONLY when you are done with the integration and you are ready to publish your app. It is against Avocarrot's policies to use live ads during development, and doing so could get your Avocarrot account banned.
  2. Publish app You are now ready to upload your app and start making money! If you have submitted your app in the Google Play/ Apple Store and you can see live ads, then you have nothing to worry about. Just wait until the impressions threshold has been reached and the app will be shown as live in your dashboard as well.
  3. Update payment details. Login to your account and update your payment settings.



Was this article useful?