Ad

public interface Ad


An object that holds data corresponding to the main Ad.

Summary

Public methods

abstract String

Returns the ad ID as specified in the VAST response.

abstract AdPodInfo

Returns the pod metadata object.

abstract String

Returns the ad system as specified in the VAST response.

abstract String[]

Returns the IDs of the ads' creatives, starting with the first wrapper ad.

abstract String[]

Returns the wrapper ad IDs as specified in the VAST response.

abstract String[]

Returns the wrapper ad systems as specified in the VAST response.

abstract String

Returns the advertiser name as defined by the serving party.

abstract List<CompanionAd>

Returns the companions for the current ad while using DAI.

abstract String

Returns the content type of the currently selected creative, or null if no creative is selected or the content type is unavailable.

abstract String

Returns the ISCI (Industry Standard Commercial Identifier) code for an ad.

abstract String

Returns the ID of the selected creative for the ad,

abstract String

Returns the first deal ID present in the wrapper chain for the current ad, starting from the top.

abstract String

Returns the description of this ad from the VAST response.

abstract double

Returns the duration of the ad in seconds, -1 if not available.

abstract int

Returns the height of the selected creative if non-linear, else returns 0.

abstract double

Returns the number of seconds of playback before the ad becomes skippable. -1 is returned for non-skippable ads or if this is unavailable.

abstract String

Returns the URL associated with the survey for the given ad.

abstract String

Returns the title of this ad from the VAST response.

abstract String

Returns custom parameters associated with the ad at the time of ad trafficking.

abstract Set<UiElement>

Returns the set of ad UI elements rendered by the IMA SDK for this ad.

abstract UniversalAdId[]

The list of all universal ad IDs for this ad.

abstract int

Returns the VAST bitrate in Kbps of the selected creative.

abstract int

Returns the VAST media height in pixels of the selected creative.

abstract int

Returns the VAST media width in pixels of the selected creative.

abstract int

Returns the width of the selected creative if non-linear, else returns 0.

abstract boolean

Indicates whether the ad’s current mode of operation is linear or non-linear.

abstract boolean

Indicates whether the ad can be skipped by the user.

Public methods

getAdId

abstract String getAdId()

Returns the ad ID as specified in the VAST response.

getAdPodInfo

abstract AdPodInfo getAdPodInfo()

Returns the pod metadata object.

getAdSystem

abstract String getAdSystem()

Returns the ad system as specified in the VAST response.

getAdWrapperCreativeIds

abstract String[] getAdWrapperCreativeIds()

Returns the IDs of the ads' creatives, starting with the first wrapper ad.

getAdWrapperIds

abstract String[] getAdWrapperIds()

Returns the wrapper ad IDs as specified in the VAST response.

getAdWrapperSystems

abstract String[] getAdWrapperSystems()

Returns the wrapper ad systems as specified in the VAST response.

getAdvertiserName

abstract String getAdvertiserName()

Returns the advertiser name as defined by the serving party.

getCompanionAds

abstract List<CompanionAdgetCompanionAds()

Returns the companions for the current ad while using DAI. Returns an empty list in any other scenario.

getContentType

abstract String getContentType()

Returns the content type of the currently selected creative, or null if no creative is selected or the content type is unavailable. For linear ads, the content type is only going to be available after the START event, when the media file is selected.

Returns
String

The content type, null if not available.

getCreativeAdId

abstract String getCreativeAdId()

Returns the ISCI (Industry Standard Commercial Identifier) code for an ad. This is the Ad-ID of the selected creative in the VAST response.

getCreativeId

abstract String getCreativeId()

Returns the ID of the selected creative for the ad,

getDealId

abstract String getDealId()

Returns the first deal ID present in the wrapper chain for the current ad, starting from the top.

getDescription

abstract String getDescription()

Returns the description of this ad from the VAST response.

Returns
String

The description, null if not specified.

getDuration

abstract double getDuration()

Returns the duration of the ad in seconds, -1 if not available.

getHeight

abstract int getHeight()

Returns the height of the selected creative if non-linear, else returns 0.

getSkipTimeOffset

abstract double getSkipTimeOffset()

Returns the number of seconds of playback before the ad becomes skippable. -1 is returned for non-skippable ads or if this is unavailable.

getSurveyUrl

abstract String getSurveyUrl()

Returns the URL associated with the survey for the given ad.

getTitle

abstract String getTitle()

Returns the title of this ad from the VAST response.

Returns
String

The title, null if not specified.

getTraffickingParameters

abstract String getTraffickingParameters()

Returns custom parameters associated with the ad at the time of ad trafficking.

getUiElements

abstract Set<UiElementgetUiElements()

Returns the set of ad UI elements rendered by the IMA SDK for this ad. This set may be different from the set of UI elements provided at setUiElements, because in some cases, some elements may be required to be displayed or unable to be displayed.

getUniversalAdIds

abstract UniversalAdId[] getUniversalAdIds()

The list of all universal ad IDs for this ad.

getVastMediaBitrate

abstract int getVastMediaBitrate()

Returns the VAST bitrate in Kbps of the selected creative.

getVastMediaHeight

abstract int getVastMediaHeight()

Returns the VAST media height in pixels of the selected creative.

getVastMediaWidth

abstract int getVastMediaWidth()

Returns the VAST media width in pixels of the selected creative.

getWidth

abstract int getWidth()

Returns the width of the selected creative if non-linear, else returns 0.

isLinear

abstract boolean isLinear()

Indicates whether the ad’s current mode of operation is linear or non-linear. Currently non-linear ads are not implemented and this will always return true.

isSkippable

abstract boolean isSkippable()

Indicates whether the ad can be skipped by the user.