AdsManager

public interface AdsManager extends BaseManager


An object which handles playing ads after they've been received from the server. After the AdsManager is retrieved from an AdsManagerLoadedEvent, init should be called first. After the LOADED event is fired, start can be called. At any time, destroy can be called to end ad playback.

Summary

Public methods

abstract void

Discards current ad break and resumes content.

abstract List<Float>

List of content time offsets in seconds at which ad breaks are scheduled.

abstract void

Pauses the current ad.

abstract void

Resumes the current ad.

abstract void

Skips the current ad.

abstract void

Starts playing the ads.

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.

From com.google.ads.interactivemedia.v3.api.BaseManager
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.

Public methods

discardAdBreak

abstract void discardAdBreak()

Discards current ad break and resumes content. If there is no current ad then the next ad break is discarded.

getAdCuePoints

abstract List<FloatgetAdCuePoints()

List of content time offsets in seconds at which ad breaks are scheduled. The list will be empty if no ad breaks are scheduled.

pause

abstract void pause()

Pauses the current ad.

resume

abstract void resume()

Resumes the current ad.

skip

abstract void skip()

Skips the current ad. AdsManager.skip() only skips ads if IMA does not render the 'Skip ad' button.

start

abstract void start()

Starts playing the ads. This will be ignored for ads lists, because init will start playback.