BaseManager

public interface BaseManager extends AdProgressProvider

Known direct subclasses
AdsManager

An object which handles playing ads after they've been received from the server.

StreamManager

An object which manages dynamic ad insertion streams.


Base interface for managing ads. Subclassed by AdsManager for directly requested ads and StreamManager for dynamic ad insertion streams.

Summary

Public methods

abstract void

Registers a listener for errors that occur during the ad or stream initialization and playback.

abstract void

Registers a listener for ad events that occur during ad or stream initialization and playback.

abstract void

Stops the ad and all tracking, then releases all assets that were loaded to play the ad.

abstract void

Generic focus endpoint that puts focus on the skip button if present.

abstract AdProgressInfo

Returns the latest AdProgressInfo for the current playing ad.

abstract Ad

Get currently playing ad.

abstract void

Initializes the ad experience using default rendering settings.

abstract void

Initializes the ad experience on the manager.

abstract void

Removes a listener for error events.

abstract void

Removes a listener for ad events.

Inherited methods

From com.google.ads.interactivemedia.v3.api.player.AdProgressProvider
abstract VideoProgressUpdate

Returns VideoProgressUpdate describing playback progress of the current ad or VideoProgressUpdate#VIDEO_TIME_NOT_READY if video details are not yet available.

Public methods

addAdErrorListener

abstract void addAdErrorListener(AdErrorEvent.AdErrorListener errorListener)

Registers a listener for errors that occur during the ad or stream initialization and playback.

addAdEventListener

abstract void addAdEventListener(AdEvent.AdEventListener adEventListener)

Registers a listener for ad events that occur during ad or stream initialization and playback.

destroy

abstract void destroy()

Stops the ad and all tracking, then releases all assets that were loaded to play the ad.

focus

abstract void focus()

Generic focus endpoint that puts focus on the skip button if present. If not present, focus is put on interactive elements, including icons or interactive creatives.

getAdProgressInfo

abstract AdProgressInfo getAdProgressInfo()

Returns the latest AdProgressInfo for the current playing ad. Ad progress info will be available after AD_PROGRESS is broadcast and only between AD_BREAK_STARTED and AD_BREAK_ENDED. When unavailable this will return null.

getCurrentAd

abstract Ad getCurrentAd()

Get currently playing ad.

init

abstract void init()

Initializes the ad experience using default rendering settings.

init

abstract void init(AdsRenderingSettings settings)

Initializes the ad experience on the manager. This will load an ad and eventually send the LOADED event, indicating the ad is ready to be started. If an ads list is loaded, this method will start playback.

removeAdErrorListener

abstract void removeAdErrorListener(AdErrorEvent.AdErrorListener errorListener)

Removes a listener for error events.

removeAdEventListener

abstract void removeAdEventListener(AdEvent.AdEventListener adEventListener)

Removes a listener for ad events.