Ad

public interface Ad

An object that holds data corresponding to the main Ad.

Public Method Summary

abstract String
getAdId()
Returns the ad ID as specified in the VAST response.
abstract AdPodInfo
getAdPodInfo()
Returns the pod metadata object.
abstract String
getAdSystem()
Returns the ad system as specified in the VAST response.
abstract String[]
getAdWrapperCreativeIds()
Returns the IDs of the ads' creatives, starting with the first wrapper ad.
abstract String[]
getAdWrapperIds()
Returns the wrapper ad IDs as specified in the VAST response.
abstract String[]
getAdWrapperSystems()
Returns the wrapper ad systems as specified in the VAST response.
abstract String
getAdvertiserName()
Returns the advertiser name as defined by the serving party.
abstract List<CompanionAd>
getCompanionAds()
Returns the companions for the current ad while using DAI.
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.
abstract String
getCreativeAdId()
Returns the ISCI (Industry Standard Commercial Identifier) code for an ad.
abstract String
getCreativeId()
Returns the ID of the selected creative for the ad,
abstract String
getDealId()
Returns the first deal ID present in the wrapper chain for the current ad, starting from the top.
abstract String
getDescription()
Returns the description of this ad from the VAST response.
abstract double
getDuration()
Returns the duration of the ad in seconds, -1 if not available.
abstract int
getHeight()
Returns the height of the selected creative if non-linear, else returns 0.
abstract double
getSkipTimeOffset()
Returns the number of seconds of playback before the ad becomes skippable.
abstract String
getSurveyUrl()
Returns the URL associated with the survey for the given ad.
abstract String
getTitle()
Returns the title of this ad from the VAST response.
abstract String
getTraffickingParameters()
Returns custom parameters associated with the ad at the time of ad trafficking.
abstract Set<UiElement>
getUiElements()
Returns the set of ad UI elements rendered by the IMA SDK for this ad.
abstract String
getUniversalAdIdRegistry()
This method is deprecated. - Use getUniversalAdIds() instead
abstract String
getUniversalAdIdValue()
This method is deprecated. - Use getUniversalAdIds() instead
abstract UniversalAdId[]
getUniversalAdIds()
The list of all universal ad IDs for this ad.
abstract int
getVastMediaBitrate()
Returns the VAST bitrate in Kbps of the selected creative.
abstract int
getVastMediaHeight()
Returns the VAST media height in pixels of the selected creative.
abstract int
getVastMediaWidth()
Returns the VAST media width in pixels of the selected creative.
abstract int
getWidth()
Returns the width of the selected creative if non-linear, else returns 0.
abstract boolean
isLinear()
Indicates whether the ad’s current mode of operation is linear or non-linear.
abstract boolean
isSkippable()
Indicates whether the ad can be skipped by the user.

Public Methods

public abstract String getAdId ()

Returns the ad ID as specified in the VAST response.

public abstract AdPodInfo getAdPodInfo ()

Returns the pod metadata object.

public abstract String getAdSystem ()

Returns the ad system as specified in the VAST response.

public abstract String[] getAdWrapperCreativeIds ()

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

public abstract String[] getAdWrapperIds ()

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

public abstract String[] getAdWrapperSystems ()

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

public abstract String getAdvertiserName ()

Returns the advertiser name as defined by the serving party.

public abstract List<CompanionAd> getCompanionAds ()

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

public 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
  • The content type, null if not available.

public 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.

public abstract String getCreativeId ()

Returns the ID of the selected creative for the ad,

public abstract String getDealId ()

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

public abstract String getDescription ()

Returns the description of this ad from the VAST response.

Returns
  • The description, null if not specified.

public abstract double getDuration ()

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

public abstract int getHeight ()

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

public 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.

public abstract String getSurveyUrl ()

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

public abstract String getTitle ()

Returns the title of this ad from the VAST response.

Returns
  • The title, null if not specified.

public abstract String getTraffickingParameters ()

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

public abstract Set<UiElement> getUiElements ()

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 AdsRenderingSettings.setUiElements(Set), because in some cases, some elements may be required to be displayed or unable to be displayed.

public abstract String getUniversalAdIdRegistry ()

This method is deprecated.
- Use getUniversalAdIds() instead

The registry associated with cataloging the UniversalAdId of the selected creative for the ad. Returns the registry value, or "unknown" if unavailable.

public abstract String getUniversalAdIdValue ()

This method is deprecated.
- Use getUniversalAdIds() instead

The UniversalAdId of the selected creative for the ad. Returns the id value or "unknown" if unavailable.

public abstract UniversalAdId[] getUniversalAdIds ()

The list of all universal ad IDs for this ad.

public abstract int getVastMediaBitrate ()

Returns the VAST bitrate in Kbps of the selected creative.

public abstract int getVastMediaHeight ()

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

public abstract int getVastMediaWidth ()

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

public abstract int getWidth ()

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

public 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.

public abstract boolean isSkippable ()

Indicates whether the ad can be skipped by the user.