Integrating with Adwhirl

This page is a quick tutorial on how to integrate, iVdopia Ads into AdWhirl SDK's.

Overview

If you are using AdWhirl system to serve ads into your application, you may integrate iVdopia Video and Banner ads into your application in a few easy steps. Please note since AdWhirl does not support PreApp, after completing this integration, you need to enable PreApp video as one of the ad Formats on iVdopia portal.

This integration will allow you to control iVdopia advertising in your apps directly from AdWhirl portal.

Prerequisites

You will need the following to integrate into AdWhirl.

Integration


Once you update your project with the current iVdopia Android SDK (add the Android SDK jar to your build path) and AdWhirl SDK jar, please follow the steps outlined below for the quickest implementation.
Update all your Activities in which you want to show iVdopia Banner Ads using AdWhirl system in the following manner. For each Activity do the same.
  1. Add following imports.

    import com.adwhirl.AdWhirlLayout;
    import com.adwhirl.AdWhirlLayout.AdWhirlInterface;
    import com.adwhirl.util.AdWhirlUtil;
    import com.vdopia.client.android.VDO;
    import com.vdopia.client.android.VDOView;
  2. Modify your Activity to implement AdWhirlInterface

    public class YourActivity1 extends Activity implements AdWhirlInterface, ...
  3. Define a private AdWhirlLayout variable in the Activity class

    private AdWhirlLayout adWhirlLayout;
  4. In onCreate function do the following after setting up content view.

    adWhirlLayout = new AdWhirlLayout(this, "<ADWHIRL SDK KEY>");
    adWhirlLayout.setAdWhirlInterface(this);
    RelativeLayout.LayoutParams adWhirlLayoutParams = new RelativeLayout.LayoutParams(320, 52);
    //layout is the view in which you want to show the Banner Ads//You can get this by calling findViewById
    layout.addView(adWhirlLayout, adWhirlLayoutParams);
  5. Add the following public function in your Activity class as AdWhirlInterface defines it. It is required, otherwise the application won't compile.

    public void adWhirlGeneric() {
      Log.e(AdWhirlUtil.ADWHIRL, "In adWhirlGeneric()");
    }
  6. On www.adwhirl.com, please define custom events ivdopiaBanners and allocate impressions to these events as appropriate.

  7. In your Activity class add following function:

    public void ivdopiaBanners() {
      VDO.initialize("<YOUR_IVDOPIA_APP_KEY>", this);
      VDOView vv = new VDOView(this);
      RelativeLayout.LayoutParams vvLayoutParams = new RelativeLayout.LayoutParams(320,  48);
      adWhirlLayout.addView(vv, vvLayoutParams);
    }
  8. You're Done!
Comments