Ad Network is a native extension to manage and centralize the process of displaying ads from a variety of publishers on mobile applications. The extensionÂ comes with built-in support for AdMob ( iOS, Android), InMobi (iOS, Android), Chartboost (iOS, Android) and iAd (iOS). If a different ad publisher is not available, a developer can easilyÂ write a plugin to implement the missing ad service.
The built-in plugins come as separate SWCs the developer must download. Each SWC is self-contained and can be used separately, but the Ad Network extension unifies them all under the same API. When showing an ad, the extension will try to load the first from the list of available publishers; if the ad is not loaded, the next service is used, and so on.
var list: Vector = new Vector (); list.push(new AdItem(new AdmobAdapter(), 10, "admob app id", "", 5)); list.push(new AdItem(new InmobiAdapter(), 10, "inmobi app id")); AdManager.getInstance().configPlatforms(list); AdManager.getInstance().showInterstitialOrCache(); AdManager.getInstance().showBannerAbsolute(AdSize.PHONE_PORTRAIT, x, y); AdManager.getInstance().showBanner(AdSize.PHONE_PORTRAIT,AdPosition.BOTTOM_CENTER);