Banner integration for Adobe Air

Integrate banner ads by initializing the SDK, creating banner ad objects post-initialization, and setting appropriate ad sizes and positions.
Read time 3 minutesLast updated 4 hours ago

Banners are a rectangular, system-initiated ads that can be either static or animated, and are served in a designated area around your live app content. Integrate and serve Banner ads through Unity LevelPlay by completing the following steps:
  1. Implement the Banner Events
  2. Load Banner Ad
  3. Destroy the Banner Ad
  4. Integrate a Banner Provider

Prerequisites

  • Ensure that you have correctly integrated the ironSource Air Plugin into your application. Integration is outlined here.
  • Integrate one of our mediation adapters with Banner support to serve this ad unit.

Step 1. Implement the Banner Events

The ironSource Air Plugin fires several events to inform you of ad availability and activity. To listen to any event, call the following method:
IronSource.instance.addEventListener( "EventName", functionToCall  );
IronSource.instance.addEventListener("levelPlayBannerAdLoaded", levelPlayBannerAdLoaded);
IronSource.instance.addEventListener("levelPlayBannerAdLoadFailed", levelPlayBannerAdLoadFailed);
IronSource.instance.addEventListener("levelPlayBannerAdClicked", levelPlayBannerAdClicked);
IronSource.instance.addEventListener("levelPlayBannerAdLeftApplication", levelPlayBannerAdLeftApplication);
IronSource.instance.addEventListener("levelPlayBannerAdScreenPresented", levelPlayBannerAdScreenPresented);
IronSource.instance.addEventListener("levelPlayBannerAdScreenDismissed", levelPlayBannerAdScreenDismissed);
The Plugin will notify the Listener of all possible events listed below:
private function levelPlayBannerAdLoaded(event:Event):void {
   //level Play Banner Ad Loaded
}
private function levelPlayBannerAdLoadFailed(event:Event):void {
   //level Play Banner Ad Load Failed
}
private function levelPlayBannerAdClicked(event:Event):void {
   //level Play Banner Ad Clicked
}
private function levelPlayBannerAdLeftApplication(event:Event):void {
   //level Play Banner Ad Left Application
}
private function levelPlayBannerAdScreenPresented(event:Event):void {
   //level Play Banner Ad Screen Presented
}
private function levelPlayBannerAdScreenDismissed(event:Event):void {
   //level Play Banner Ad Screen Dismissed
}

Step 2. Load Banner Ad

To load a Banner ad, call the following method:
IronSource.instance.loadBanner(IronSourceBannerSize.BANNER, IronSource.POSITION_BOTTOM);

Banner Dimensions & Position

When loading the banner, make sure to configure your Banner Size and Position:

Sizes

Description

Dimensions

Ad Network Support

BANNERStandard Banner Best for Phones & Tablets50 X screen widthAppLovin, Digital Turbine, Google, Liftoff Monetize, Meta, Mintegral, Unity Ads
LARGE_BANNERLarge Banner Best for Tablets and Larger Devices90 X screen widthAdmob, AppLovin
RECTANGLE_BANNERLarge Rectangular Banner Best for Scrollable Feeds or Between Game Levels250 X screen widthAdmob, AppLovin
SMART_BANNERSmart Banner Renders ads that automatically resize to fit the device’s size and orientation50 (screen height ≤ 720) X screen width 90 (screen height > 720) X screen widthAdmob, AppLovin

Position

Description

POSITION_TOPBanner will be positioned at the top center of the screen
POSITION_BOTTOMBanner will be positioned at the bottom center of the screen

Banner Placements

We support placements, as well as capping and pacing for Banners on the Unity LevelPlay dashboard. If you've set up placements for your Banner, call the following method to serve a Banner ad in a specific location:
IronSource.instance.loadBanner(IronSourceBannerSize.BANNER, IronSource.POSITION_BOTTOM, YOUR_PLACEMENT_NAME);
You will receive the
levelPlayBannerAdLoaded
and the banner will show on your app.

Hide & Display Banner

In order to provide maximum flexibility in the ad experience, you now have the ability to hide and present banners on your app. After you've loaded and served a banner, you can choose to hide this banner and re-show it at a later point in your app. To hide the banner, call this function:
IronSource.instance.hideBanner();
To then show this same banner again, call this function:
IronSource.instance.displayBanner();

Step 3. Destroy the Banner Ad

After you've successfully served a Banner, we recommend calling the below function to destroy the previous Banner.
IronSource.instance.destroyBanner();
After you call this method, the Banner in question can no longer be used. In the case you want to serve it again, you will need to request a new Banner using the [icode]loadBanner[/icode] method.

Step 4. Integrate a Banner Provider

Next, integrate the ad network adapters to serve Banners through Unity LevelPlay Mediation. You can find the supported networks below, and bannerSize behaviour for each network:

Banner Support

BANNER

LARGE

RECTANGLE

SMART

ironSourceBannerLarge
Banner / Leaderboard
BannerBannerMedium RectangleBanner / Leaderboard
BannerBannerMedium RectangleBanner / Leaderboard
BannerLarge*Medium RectangleBanner / Leaderboard
BannerLargeMedium RectangleBanner / Leaderboard
BannerBanner-Leaderboard
BannerBannerMedium RectangleBanner / Leaderboard
Verify your integration with our Integration Helper.

Next steps

Follow our integration guides to integrate additional ad units: Also refer to our supported Mediation Networks.