Integrating Banner Ads


Integrating an Ad Spot allows you to integrate the following ad types into your SDK:

  • Banner
  • Medium rectangle
  • Medium rectangle video
  • Square video
  • Landscape video

Step 1: Adding the Ad Spot

  1. First add the Ad Spot integration for the display as well as the Adview Controller:

Add the Spot Integration

// spot integration for display Square
mSpot = InneractiveAdSpotManager.get().createSpot();
// adding the adview controller
InneractiveAdViewUnitController controller = new InneractiveAdViewUnitController();
  1. If you want to receive video events (for Medium rectangle video, Square video and Landscape video), add the video content controller code as well:

Add Video Content Controller

// in case we want to receive video events and increased capabilities we should add the video content controller
// the content controller is added to the ad view controller object
InneractiveAdViewVideoContentController videoContentController = new InneractiveAdViewVideoContentController();

Step 2: Making the Ad Request

The request and display steps are separate for the Ad Spot.

  1. It's time to set up the ad request.

Setting Up Your Ad Request

InneractiveAdRequest adRequest = new InneractiveAdRequest("");
// enriching with user and keywords data
// for gender values see: InneractiveUserConfig.Gender
adRequest.setUserParams( new InneractiveUserConfig()
// Add keywords. Separated by a comma
//when ready to perform the ad request

Step 2a: Listening to Request Events

Choose the type of listening event you would like:

Listening Request
Listening Video

Step 3: Displaying the Ad

  1. Once you've set up the request, it's time to set up displaying the ad.

Setting Up Displaying the Ad

// checking if we have ad content
if(mSpot.isReady()) {
    // getting the spot's controller
    InneractiveAdViewUnitController controller = (InneractiveAdViewUnitController)mSpot.getSelectedUnitController();
    // getting the ad view container
    ViewGroup layout = (ViewGroup)findViewById(;
    // showing the ad

Step 4: Defining the Ad Layout

  1. After you've added the ad spot, it's time to define the ad layout.

Define Your Ad Layout

< LinearLayout
 / >

You have now completed the process of adding your Ad Spot!

Click here for details of how to dismiss an Ad Spot.

Next Steps

Click the links below to add another ad type.