Skip to content

Unity iOS Advanced Usage

yanivav edited this page Jul 3, 2014 · 13 revisions

######This section describes advanced usage and personal customization options and is not mandatory for the integration.

##Selecting Interstitial Ad Type When calling an interstitial ad, the ad type with the best performance will be automatically selected. If you would like to explicitly choose the type of ad, use the "withType" parameter when calling loadAd.

The options for this parameter are:

Constant Name Description Specific Ad Load Example
STAAdType_Automatic (Recommended) Automatic selects the most suitable banner of the two listed below [startAppAd loadAd:STAAdType_Automatic ];
STAAdType_FullScreen A full-page ad [startAppAd loadAd:STAAdType_FullScreen ];
STAAdType_OfferWall A full page offerwall [startAppAd loadAd:STAAdType_OfferWall ];
STAAdType_Overlay An overlay Ad is a full page Ad that runs on top of your application [startAppAd loadAd:STAAdType_Overlay ];

We highly recommend adding the Automatic type, which automatically selects the best type to display.

Back to top

##Adding a callback when Ad has been loaded

StartAppWrapper.loadAd() can get an implementation of AdEventListener as a parameter. In case you want to get a callback for the ad load, pass the object which implements StartAppWrapper.AdEventListener as a parameter to the method. This object should implement the following methods:

public void onReceiveAd(){
}
public void onFailedToReceiveAd(){
}
##Adding a callback when Ad has been shown

StartAppWrapper.showAd() can get an implementation of AdDisplayListener as a parameter. In case you want to get a callback for the ad show, pass the object which implements StartAppWrapper.AdDisplayListener as a parameter of the method. This object should implement the following methods:

public void adHidden(){
}
public void adDisplayed(){
}

Back to top

Clone this wiki locally