An Ad Manager custom native ad format. Custom (user-defined) native ad formats allow you to define your own variables for traditional native ads. Custom native ad formats let you define and render your own assets, and allows you to define the click behavior of the ad.
| interface | NativeCustomFormatAd.DisplayOpenMeasurement | An interface for open measurement in display ads. | |
| interface | NativeCustomFormatAd.OnCustomClickListener | Interface definition for a callback to be invoked when a user clicks on a custom native ad format. | |
| interface | NativeCustomFormatAd.OnCustomFormatAdLoadedListener | Interface definition for a callback to be invoked when a custom native ad format has successfully loaded. | |
| String | ASSET_NAME_VIDEO | The asset name associated with the video content
returned by
getMediaContent(). |
| abstract void |
destroy()
Destroys the ad object.
|
| abstract List<String> |
getAvailableAssetNames()
Returns a list of all available assets.
|
| abstract String |
getCustomFormatId()
Returns the custom native ad format's ID as defined in the Ad Manager UI.
|
| abstract NativeCustomFormatAd.DisplayOpenMeasurement |
getDisplayOpenMeasurement()
Returns the
NativeCustomFormatAd.DisplayOpenMeasurement associated with this ad.
|
| abstract NativeAd.Image | |
| abstract MediaContent |
getMediaContent()
Returns the
MediaContent
associated with this ad.
|
| abstract CharSequence | |
| abstract void | |
| abstract void |
recordImpression()
Records an impression.
|
The asset name associated with the video content returned by
getMediaContent(). This is the asset name that will be reported in
NativeCustomFormatAd.OnCustomClickListener.onCustomClick(NativeCustomFormatAd,
String) when the user clicks on the MediaView
containing with the video content returned by
getMediaContent().
Destroys the ad object. No other methods should be called on the ad object after
destroy() is called.
Returns a list of all available assets.
Returns the custom native ad format's ID as defined in the Ad Manager UI.
Returns the
NativeCustomFormatAd.DisplayOpenMeasurement associated with this ad.
null if display open measurement is not available for this ad.Returns an image asset.
| assetName | The name of the asset to be retrieved. |
|---|
Returns the MediaContent
associated with this ad.
Returns a string asset of numbers, URLs, or other types other than an image asset.
| assetName | The name of the asset to be retrieved. |
|---|
Performs a click on the ad, executing its clickthrough behavior.
| assetName | The name of the asset that was clicked. |
|---|
Records an impression. Call this method when the ad is first shown to the user.