public class

MaxInterstitialAd

extends Object
java.lang.Object
   ↳ com.applovin.mediation.ads.MaxInterstitialAd

Class Overview

This class represents a full screen interstitial ad.

Summary

Public Constructors
MaxInterstitialAd(String adUnitId, Activity activity)
Create a new Max interstitial.
MaxInterstitialAd(String adUnitId, AppLovinSdk sdk, Activity activity)
Create a new Max interstitial.
Public Methods
void destroy()
Destroy current ad and fully remove it from memory.
boolean isReady()
Check if this ad is ready to be shown.
void loadAd()
Load ad for the current interstitial.
void setExtraParameter(String key, String value)
Set an extra parameter to pass to the server.
void setListener(MaxAdListener listener)
Set a listener that will be notified about ad events.
void showAd()
Show the loaded interstitial.
void showAd(String placement)
Show the loaded interstitial ad for a given placement to tie ad events to.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MaxInterstitialAd (String adUnitId, Activity activity)

Create a new Max interstitial.

Parameters
adUnitId Ad unit id to load ads for. Must not be null.
activity Current activity. Must not be null.

public MaxInterstitialAd (String adUnitId, AppLovinSdk sdk, Activity activity)

Create a new Max interstitial.

Parameters
adUnitId Ad unit id to load ads for. Must not be null.
sdk SDK to use. Must not be null. An instance of the SDK may be obtained by calling AppLovinSdk.getInstance().
activity Current activity. Must not be null.

Public Methods

public void destroy ()

Destroy current ad and fully remove it from memory.

public boolean isReady ()

Check if this ad is ready to be shown.

Returns
  • true if the ad is ready to be shown.

public void loadAd ()

Load ad for the current interstitial. Use setListener(MaxAdListener) to assign a listener that should be notified about ad load state.

public void setExtraParameter (String key, String value)

Set an extra parameter to pass to the server.

Parameters
key Parameter key. Must not be null.
value Parameter value. May be null.

public void setListener (MaxAdListener listener)

Set a listener that will be notified about ad events.

Parameters
listener Listener to be notified. May be null.

public void showAd ()

Show the loaded interstitial.

Use setListener(MaxAdListener) to assign a listener that should be notified about display events. Use isReady() to check if an ad was successfully loaded.

public void showAd (String placement)

Show the loaded interstitial ad for a given placement to tie ad events to.

Use setListener(MaxRewardedAdListener) to assign a listener that should be notified about display events. Use isReady() to check if an ad was successfully loaded.

Parameters
placement The placement to tie the showing ad's events to.

public String toString ()