AdMetadata

class AdMetadata(val networkId: Int, val campaignId: String, val bannerId: String, val contentUnit: String, val adType: String, val adName: String?, var adData: MutableMap<String, String>?, var renderConfig: JSONObject? = null, val height: Int?, val width: Int?, val aspectRatio: Float?, var durationMetadata: AdMetadata.DurationMetadata?, var rendererMetadata: MutableMap<String, Any>? = null, val isDSAButtonShown: Boolean) : Parcelable

A class that contains the basic data about the advertisement and renderer.

An object of this class can be taken from Advertisement if the advertisement was successfully loaded. You can use this object to debug or configure your view. One example is setting the aspect ratio for the presentation of your ad using aspectRatio.

If you are developing a custom renderer, you will receive an object of this class in the AdRenderer.configure method. If you need to pass some information from the renderer, we recommend using rendererMetadata for this.

Constructors

Link copied to clipboard
constructor(networkId: Int, campaignId: String, bannerId: String, contentUnit: String, adType: String, adName: String?, adData: MutableMap<String, String>?, renderConfig: JSONObject? = null, height: Int?, width: Int?, aspectRatio: Float?, durationMetadata: AdMetadata.DurationMetadata?, rendererMetadata: MutableMap<String, Any>? = null, isDSAButtonShown: Boolean)

Creates an AdMetadata instance. You can use this constructor for testing. Normally you do not need to use it.

Types

Link copied to clipboard

The object structure of which has different indicators of the duration of ad loading.

Properties

Link copied to clipboard

Extended configuration relevant for ads that are rendered natively.

Link copied to clipboard

The name of advertisement.

Link copied to clipboard

The type of advertisement.

Link copied to clipboard

The aspect ratio of an advertising banner. It can be used to determine the size of inline advertising.

Link copied to clipboard

The banner identifier the advertisement has been served for.

Link copied to clipboard

The campaign identifier the advertisement has been served for.

Link copied to clipboard

Unique identifier of a content space in the ADITION ad-serving platform.

Link copied to clipboard

An object that has time intervals associated with the loading of ads.

Link copied to clipboard
val height: Int?

The height of an advertising banner.

Link copied to clipboard

Parameter for displaying the DSA button on the banner.

Link copied to clipboard

The unique identifier of the advertisement network.

Link copied to clipboard

Extended configuration relevant for ads that are rendered natively.

Link copied to clipboard

Additional data transferred from the renderer.

Link copied to clipboard
val width: Int?

The width of an advertising banner.

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)