Ad

public interface Ad

Known direct subclasses
AppOpenAd

App open ads are used to monetize app load screens.

BannerAd

An SDK-rendered rectangular ad that occupies a portion of an app's layout.

CustomNativeAd

Custom (user-defined) native ad formats allow you to create your own native ad formats by defining custom lists of assets and the click behavior of the ad.

IconAd

An ad that highlights an app icon.

InterstitialAd

A full page ad experience at natural transition points such as a page change, an app launch, or a game level load.

NativeAd

A native ad is composed of ad assets that are displayed using Android UI components.

RewardedAd

A full screen ad that provides the user the opportunity to opt-in to watching a video or engaging with a playable ad in exchange for a reward within the app.

RewardedInterstitialAd

Rewarded interstitials are full screen incentivized ads that reward users and appear automatically during natural app transitions.


Base class for Google Mobile Ads SDK ads for common state, e.g. listeners and metadata.

Summary

Public methods

abstract void

Destroys the ad, stopping any extra processing and destroying resources associated with the ad.

abstract long

An identifier for a placement in reporting.

abstract @NonNull ResponseInfo

Gets information about the ad response for this ad.

abstract void
setPlacementId(long placementId)

An identifier for a placement in reporting.

Public methods

destroy

abstract void destroy()

Destroys the ad, stopping any extra processing and destroying resources associated with the ad. No other methods should be called on this ad after destroy is called.

getPlacementId

abstract long getPlacementId()

An identifier for a placement in reporting. This property must be set prior to presenting the ad.

getResponseInfo

abstract @NonNull ResponseInfo getResponseInfo()

Gets information about the ad response for this ad.

setPlacementId

abstract void setPlacementId(long placementId)

An identifier for a placement in reporting. This property must be set prior to presenting the ad.