目录

InterstitialAd

Class Info

public InterstitialAd extends Object

Interstitial ad.

Public Constructor Summary

Constructor Name

InterstitialAd(Context context)

Constructor.

Public Method Summary

Qualifier and Type

Method Name and Description

String

getAdId()

Obtains the ad unit ID of an ad.

AdListener

getAdListener()

Obtains the listener for an ad.

boolean

isLoaded()

Checks whether an ad has been loaded.

boolean

isLoading()

Checks whether an ad is being loaded.

void

loadAd(AdParam adParam)

Initiates a request to load an ad.

void

setAdId(String adId)

Sets the ad unit ID for an ad.

void

setAdListener(AdListener adListener)

Sets the listener for ad status.

void

setRewardAdListener(RewardAdListener rewardAdListener)

Sets a listener for rewarded ad loading.

void

show()

Shows an interstitial ad.

CAUTION:

This method has been deprecated. Use show(Activity activity) instead.

void

show(Activity activity)

Shows an interstitial ad.

void

setVideoConfiguration(VideoConfiguration videoConfiguration)

Sets video playback parameters.

For details, please refer to VideoConfiguration.

BiddingInfo

getBiddingInfo()

Obtains the real-time bidding data returned to the app.

void

sendBiddingSuccess(Map<String, Object> sendSuccessInfo, ReportUrlListener reportUrlListener)

Reports the bidding success result.

void

sendBiddingFailed(Map<String, Object> sendFailInfo, ReportUrlListener reportUrlListener)

Reports the bidding failure result.

Public Constructors

[h2]InterstitialAd

Constructor

public InterstitialAd(Context context)

Constructs an interstitial ad.

Parameters

Name

Description

context

Context.

Public Methods

[h2]getAdId

Method

public final String getAdId()

Obtains the ad unit ID of an ad.

Returns

Type

Description

String

Ad unit ID if it is set; null otherwise.

[h2]getAdListener

Method

public final AdListener getAdListener()

Obtains the listener for an ad.

Returns

Type

Description

AdListener

Ad listener if it is set; null otherwise.

[h2]isLoaded

Method

public final boolean isLoaded()

Checks whether an ad has been loaded.

Returns

Type

Description

boolean

Whether an ad has been loaded.

  • true: yes
  • false: no

[h2]isLoading

Method

public final boolean isLoading()

Checks whether an ad is being loaded.

Returns

Type

Description

boolean

Whether an ad is being loaded.

  • true: yes
  • false: no

[h2]loadAd

Method

public final void loadAd(AdParam adParam)

Initiates a request to load an ad.

Parameters

Name

Description

adParam

Ad request parameter information.

[h2]setAdId

Method

public final void setAdId(String adId)

Sets the ad unit ID for an ad.

Parameters

Name

Description

adId

Ad unit ID.

[h2]setAdListener

Method

public final void setAdListener(AdListener adListener)

Sets the listener for ad status.

Parameters

Name

Description

adListener

Ad listener.

[h2]setRewardAdListener

Method

public final void setRewardAdListener(RewardAdListener rewardAdListener)

Sets a listener for rewarded ad loading.

Parameters

Name

Description

rewardAdListener

Listener for rewarded ad loading.

[h2]show

This method has been deprecated. Use show(Activity activity) instead.

Method

public final void show()

Shows an interstitial ad.

[h2]show(Activity activity)

Method

public final void show(Activity activity)

Shows an interstitial ad.

Parameters

Name

Description

activity

Activity.

[h2]setVideoConfiguration(VideoConfiguration videoConfiguration)

Method

public final void setVideoConfiguration(VideoConfiguration videoConfiguration)

Sets video playback parameters.

Parameters

Name

Description

videoConfiguration

Video configuration that controls video playback.

[h2]getBiddingInfo

Method

public BiddingInfo getBiddingInfo()

Obtains the real-time bidding data returned to the app.

Returns

Name

Description

BiddingInfo

Real-time bidding information returned by the ADX.

[h2]sendBiddingSuccess

Method

public void sendBiddingSuccess(Map<String, Object> sendSuccessInfo, ReportUrlListener reportUrlListener)

Reports the bidding success result.

Parameters

Name

Description

sendSuccessInfo

Macro replacement parameters when a bid is successful; of the Map type.

The key represents the macro that needs to be replaced in the URL and is of the String type, while the value represents the corresponding replacement information and is of the Object type.

For details about macro replacement, please refer to Real-Time Bidding.

ReportUrlListener

Called when the bidding result is reported.

[h2]sendBiddingFailed

Method

public void sendBiddingFailed(Map<String, Object> sendFailInfo, ReportUrlListener reportUrlListener)

Reports the bidding failure result.

Parameters

Name

Description

sendFailInfo

Macro replacement parameters for a failed bid; of the Map type.

The key represents the macro that needs to be replaced in the URL and is of the String type, while the value represents the corresponding replacement information and is of the Object type.

For details about macro replacement, please refer to Real-Time Bidding.

ReportUrlListener

Called when the bidding result is reported.