Home


Interstitial Ads

Interstitial Ads are short static or video ads, usually shown between levels or when game is over.

Simple example:
if (Enhance.isInterstitialReady()) {
    // An ad is ready, show it
    Enhance.showInterstitialAd();
}
Example using Placements:
if (Enhance.isInterstitialReady("main_menu")) {
    // The "main menu" ad is ready, show it
    Enhance.showInterstitialAd("main_menu");
}

Methods

Enhance.isInterstitialReady

Boolean Enhance.isInterstitialReady(
    optional String placement = "default"
)

Check if an ad from any of the included SDK providers is ready to be shown.

Parameters:

optional String  placement - Specifies the internal placement of the ad (from the Enhance mediation editor).

Return Value:

Returns true if any ad is ready, false otherwise. When app is not Enhanced, always returns true.

Enhance.showInterstitialAd

void Enhance.showInterstitialAd(
    optional String placement = "default"
)

Display an ad if any is currently available. The ad provider is selected based on your app's mediation settings.

Parameters:

optional String  placement - Specifies the internal placement of the ad (from the Enhance mediation editor).

Properties

String Enhance.PLACEMENT_DEFAULT

The default internal placement of all ad types. Always equal to "default".

Console