目录

CLASS info
public InterstitialAd extends Object
Interstitial ad.

Public Constructor Summary

Constructor name
InterstitialAd(Context context)
Interstitial ad constructor.

Public Method Summary

Return typeMethod name
StringgetAdId()
Gets an ad slot ID.
AdListenergetAdListener()
Gets an ad listener.
booleanisLoaded()
Checks whether ad loading is complete.
booleanisLoading()
Checks whether ads are being loaded.
voidloadAd(AdParam adParam)
Initiates a request to load an ad.
voidsetAdId(String adId)
Sets the ad slot ID for an ad.
voidsetAdListener(AdListener adListener)
Sets an ad status listener.
voidsetRewardAdListener(RewardAdListener rewardAdListener)
Sets a rewarded ad listener.
voidshow()
Displays an interstitial ad.

Public Constructors

Constructor
public InterstitialAd(Context context)
Interstitial ad constructor.

Parameters

Parameter nameParameter desc
contextContext.

Public Methods

Method
public final AdListener getAdListener()
Gets an ad listener.


Return

typedesc
AdListenerAd listener. If it is not set, null is returned.
Method
public final String getAdId()
Gets an ad slot ID.


Return

typedesc
StringAd slot ID. If it is not set, null is returned.
Method
public final boolean isLoaded()
Checks whether ad loading is complete.


Return

typedesc
booleanIf ad loading is complete, true is returned. Otherwise, false is returned.
Method
public final boolean isLoading()
Checks whether ads are being loaded.


Return

typedesc
booleanIf ads are being loaded, true is returned. Otherwise, false is returned.
Method
public final void loadAd(AdParam adParam)
Initiates a request to load an ad.The android.permission.INTERNET permission must be added. If the ad slot ID is not set, IllegalStateException is thrown.


Parameters

Parameter nameParameter desc
adRequestAd request parameter information.
Method
public final void setAdListener(AdListener adListener)
Sets an ad status listener.


Parameters

Parameter nameParameter desc
adListenerAd listener.
Method
public final void setAdId(String adId)
Sets the ad slot ID for an ad.


Parameters

Parameter nameParameter desc
adIdAd slot ID.
Method
public final void show()
Displays an interstitial ad.
Method
public final void setRewardAdListener(RewardAdListener rewardAdListener)
Sets a rewarded ad listener.


Parameters

Parameter nameParameter desc
rewardAdListenerRewarded ad listener.


Return

typedesc
BundleAd content.