Last updated on October 4, 2017

Using the Listener interface

You can assign an ad event listener callback to receive events via the adView.addAdEventListener() method. Using these callbacks is highly recommended for understanding the events in your app.

Callback method

Invoked when

adDidLoad(AdView adView, AdDetails adDetails)

An ad is loaded (though not necessarily shown).

Note: AdDetails includes a transactionId that uniquely identifies the ad, which you can use for managing and reporting ad qualitySettings that control the types of ads that can display on your inventory. issues.

adDidFailToLoad(AdView adView, AdException error)

The loading of an ad fails for any reason. For details about the types of exceptions that can occur, see Ad exceptions.

adDidDisplay(AdView adView)

A loaded ad is displayed.

adDidComplete(AdView adView)

An ad has finished displaying.

adWasClicked(AdView adView)

An ad was clicked.

adClickThroughDidClose(AdView adView)

A clicked ad was closed.

adInterstitialDidClose(AdView adView)

An interstitialA full-screen ad displayed in content transitions. For example, a video ad that loads between levels of a mobile game. ad was closed by user.

adDidExpand(AdView adView)

An MRAIDMobile Rich Ad Interface Definitions, a type of API framework for interfacing between an ad creative and native mobile capabilities. bannerThis is an ad that appears on a web page which is typically hyperlinked to an advertiser’s website. Banners can be images (GIF, JPEG, PNG), JavaScript programs or multimedia objects (For example, Java). ad is expanded.

adDidCollapse(AdView adView)

An expanded MRAID banner ad is collapsed.

Fill out my online form.