Interstitial ads are full-screen advertisements.

In Appodeal, they are divided into two types - static interstitial and video interstitial.

Both types of ads are requested in parallel when caching and will be shown to be the most expensive of the two.

  • Static interstitial - static full-screen banners.
  • Video interstitial - these are videos that the user can close 5 seconds after the start of viewing.

1. Display interstitial

To display interstitial, you need to call the following code in the activity:

Appodeal.show(activity, Appodeal.INTERSTITIAL);

SDK can't show ads without a network connection!

Appodeal.show() returns a boolean value indicating whether the show method call was passed to the appropriate SDK. 

2. Check if interstitial is loaded

Appodeal.isLoaded(Appodeal.INTERSTITIAL);

3. Use interstitial callbacks

Appodeal.setInterstitialCallbacks(new InterstitialCallbacks() {
  @Override
  public void onInterstitialLoaded(boolean isPrecache) {
    // Called when interstitial is loaded
  }
  @Override
  public void onInterstitialFailedToLoad() {
    // Called when interstitial failed to load
  }
  @Override
  public void onInterstitialShown() {
    // Called when interstitial is shown
  }
  @Override
  public void onInterstitialShowFailed() {
    // Called when interstitial show failed 
  }
  @Override
  public void onInterstitialClicked() {
    // Called when interstitial is clicked
  }
  @Override
  public void onInterstitialClosed() {
    // Called when interstitial is closed
  }
  @Override
  public void onInterstitialExpired()  {
    // Called when interstitial is expired
  }
});

All callbacks are called on the main thread.

4. Cache ad manually

To disable automatic caching for interstitials, use the code below before the SDK initialization:

Appodeal.setAutoCache(Appodeal.INTERSTITIAL, false);

To cache interstitial use:

Appodeal.cache(activity, Appodeal.INTERSTITIAL);
Read more on manual caching in our FAQ.

5. Check if interstitial was initialized

To check if interstitial was initialized, you can use the method:

Appodeal.isInitialized(activity, Appodeal.INTERSTITIAL);
Returns true, if the interstitial was initialized.

6. Check if autocache is enabled for interstitial

To check if autocache is enabled for interstitial, you can use the method:

Appodeal.isAutoCacheEnabled(activity, Appodeal.INTERSTITIAL);
Returns true, if autocache is enabled for interstitial.

7. Get predicted eCPM for interstitial

To get the predicted eCPM from the next block in the caching queue, use the method:

Appodeal.getPredictedEcpm(Appodeal.INTERSTITIAL);

This method is reasonable to use if manual caching of ads is enabled.

8. Mute videos if call volume is muted

You can mute the sound in a video interstitial using the method:

Appodeal.muteVideosIfCallsMuted(true);

This method works if the user's device has silent mode or only vibration enabled.