Follow

Advanced Usage - Selecting Interstitial Ad Type

View original article on our GitHub

We highly recommend using our Automatic mode, which automatically selects the best Interstitial Ad to display, meaning the type of Ads that will generate the most revenue for you.
To add an automatic Interstitial Ad, please refer to Interstitial Ads. If you do not wish to use the automatic mode, startAppAd.loadAd() can be directed to load specific Ads to be shown later using the AdMode parameter. The options for the AdMode parameter are:

Parameter NameDescriptionSpecific Ad Load Example
AUTOMATIC(Recommended) Auto-selection of the best next Interstitial Ad to display, meaning the type of Ads that will generate the most revenue for you. This is the default startAppAd.loadAd(AdMode.AUTOMATIC)
OFFERWALL Auto-selection of a Standard 2D full screen Offer Wall or a 3D Offer Wall startAppAd.loadAd(AdMode.OFFERWALL)

When using this mode, the following additional methods must be implemented in the Activity’s life-cycle:

1 Override the onSaveInstanceState(Bundle outState) method and add a call tostartAppAd.onSaveInstanceState(outstate).

NOTE: Add this method immediately after the super.onSaveInstanceState(outState) method.

Example

@Override
protected void onSaveInstanceState (Bundle outState){
   super.onSaveInstanceState(outState);
   startAppAd.onSaveInstanceState(outState);
}

2 Override the onRestoreInstanceState(Bundle savedInstanceState) method and add a call tostartAppAd.onRestoreInstanceState(savedInstanceState).

NOTE: Add this method immediately before the methodsuper.onRestoreInstanceState(savedInstanceState).

Example

@Override
protected void onRestoreInstanceState (Bundle savedInstanceState){
   startAppAd.onRestoreInstanceState(savedInstanceState);
   super.onRestoreInstanceState(savedInstanceState);
}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments