AdEvent

public interface AdEvent


Event to notify publisher that an event occurred with an Ad.

Summary

Nested types

public interface AdEvent.AdEventListener

Listener interface for ad events.

Types of events that can occur during ad playback.

Public methods

abstract Ad

Returns the ad with which this event is associated.

abstract Map<StringString>

Returns a map containing any extra ad data for the event, if needed.

default @Nullable AdPeriodInfo

Returns AdPeriodInfo if the event is of type AD_PERIOD_STARTED.

default @Nullable AdProgressInfo

Returns AdProgressInfo if the event is of type AD_PROGRESS.

abstract AdEvent.AdEventType

Returns the type of event that occurred.

Public methods

getAd

abstract Ad getAd()

Returns the ad with which this event is associated.

getAdData

abstract Map<StringStringgetAdData()

Returns a map containing any extra ad data for the event, if needed.

Note: different event types will fill this map with different contents. For information on how a particular event type uses the ad data, see the documentation for that event type, for example, the documentation for the LOG event specifies its use of ad data.

getAdPeriodInfo

default @Nullable AdPeriodInfo getAdPeriodInfo()

Returns AdPeriodInfo if the event is of type AD_PERIOD_STARTED.

getAdProgressInfo

default @Nullable AdProgressInfo getAdProgressInfo()

Returns AdProgressInfo if the event is of type AD_PROGRESS.

getType

abstract AdEvent.AdEventType getType()

Returns the type of event that occurred.