ImaSdkFactory

public class ImaSdkFactory extends Object

Factory class for creating SDK objects.

Public Method Summary

AdDisplayContainer
createAdDisplayContainer()
Creates an AdDisplayContainer to hold the player for video ads, a container for non-linear ads, and slots for companion ads.
AdsLoader
createAdsLoader(Context context, ImaSdkSettings settings, AdDisplayContainer container)
Creates an AdsLoader for requesting ads using the specified settings object.
AdsLoader
createAdsLoader(Context context, ImaSdkSettings settings)
This method is deprecated. - set container while creating AdsLoader. Creates an AdsLoader for requesting ads using the specified settings object. This is the ONLY way to specify a non-default language for the Ad UI.
AdsLoader
createAdsLoader(Context context)
Creates an AdsLoader for requesting ads.
AdsLoader
createAdsLoader(Context context, ImaSdkSettings settings, StreamDisplayContainer container)
Creates an AdsLoader for requesting server-side ad insertion ads using the specified settings object.
AdsRenderingSettings
createAdsRenderingSettings()
Creates an AdsRenderingSettings object to give the AdsManager parameters that control the rendering of ads.
AdsRequest
createAdsRequest()
Creates an AdsRequest object to contain the data used to request ads.
CompanionAdSlot
createCompanionAdSlot()
Creates a CompanionAdSlot for the SDK to fill with companion ads.
ImaSdkSettings
createImaSdkSettings()
Creates an ImaSdkSettings object for configuring the IMA SDK.
StreamRequest
createLiveStreamRequest(String assetKey, String apiKey)
Creates a StreamRequest object to contain the data used to request a server-side ad insertion live stream.
StreamRequest
createLiveStreamRequest(String assetKey, String apiKey, StreamDisplayContainer streamDisplayContainer)
This method is deprecated. - set container while creating AdsLoader. Creates a StreamRequest object to contain the data used to request a server-side ad insertion live stream.
StreamDisplayContainer
createStreamDisplayContainer()
Creates a StreamDisplayContainer to hold the player for server-side ad insertion streams and slots for companion ads.
StreamRequest
createVodStreamRequest(String contentSourceId, String videoId, String apiKey)
Creates a StreamRequest object to contain the data used to request a server-side ad insertion video on demand stream.
StreamRequest
createVodStreamRequest(String contentSourceId, String videoId, String apiKey, StreamDisplayContainer streamDisplayContainer)
This method is deprecated. - set container while creating AdsLoader. Creates a StreamRequest object to contain the data used to request a server-side ad insertion video on demand stream.
static ImaSdkFactory
getInstance()
Returns the global ImaSdkFactory object.

Inherited Method Summary

Public Methods

public AdDisplayContainer createAdDisplayContainer ()

Creates an AdDisplayContainer to hold the player for video ads, a container for non-linear ads, and slots for companion ads.

public AdsLoader createAdsLoader (Context context, ImaSdkSettings settings, AdDisplayContainer container)

Creates an AdsLoader for requesting ads using the specified settings object. This is the ONLY way to specify a non-default language for the Ad UI.

Parameters
context
settings
container

public AdsLoader createAdsLoader (Context context, ImaSdkSettings settings)

This method is deprecated.
- set container while creating AdsLoader. Creates an AdsLoader for requesting ads using the specified settings object. This is the ONLY way to specify a non-default language for the Ad UI.

Parameters
context
settings

public AdsLoader createAdsLoader (Context context)

Creates an AdsLoader for requesting ads.

Parameters
context

public AdsLoader createAdsLoader (Context context, ImaSdkSettings settings, StreamDisplayContainer container)

Creates an AdsLoader for requesting server-side ad insertion ads using the specified settings object. This is the ONLY way to specify a non-default language for the Ad UI.

Parameters
context
settings
container

public AdsRenderingSettings createAdsRenderingSettings ()

Creates an AdsRenderingSettings object to give the AdsManager parameters that control the rendering of ads.

public AdsRequest createAdsRequest ()

Creates an AdsRequest object to contain the data used to request ads.

public CompanionAdSlot createCompanionAdSlot ()

Creates a CompanionAdSlot for the SDK to fill with companion ads.

public ImaSdkSettings createImaSdkSettings ()

Creates an ImaSdkSettings object for configuring the IMA SDK.

public StreamRequest createLiveStreamRequest (String assetKey, String apiKey)

Creates a StreamRequest object to contain the data used to request a server-side ad insertion live stream.

Parameters
assetKey This is used to determine which stream should be played. The live stream request asset key is an identifier which can be found in the DFP UI.
apiKey

public StreamRequest createLiveStreamRequest (String assetKey, String apiKey, StreamDisplayContainer streamDisplayContainer)

This method is deprecated.
- set container while creating AdsLoader. Creates a StreamRequest object to contain the data used to request a server-side ad insertion live stream.

Parameters
assetKey This is used to determine which stream should be played. The live stream request asset key is an identifier which can be found in the DFP UI.
apiKey
streamDisplayContainer

public StreamDisplayContainer createStreamDisplayContainer ()

Creates a StreamDisplayContainer to hold the player for server-side ad insertion streams and slots for companion ads.

public StreamRequest createVodStreamRequest (String contentSourceId, String videoId, String apiKey)

Creates a StreamRequest object to contain the data used to request a server-side ad insertion video on demand stream.

Parameters
contentSourceId
videoId
apiKey

public StreamRequest createVodStreamRequest (String contentSourceId, String videoId, String apiKey, StreamDisplayContainer streamDisplayContainer)

This method is deprecated.
- set container while creating AdsLoader. Creates a StreamRequest object to contain the data used to request a server-side ad insertion video on demand stream.

Parameters
contentSourceId
videoId
apiKey
streamDisplayContainer

public static ImaSdkFactory getInstance ()

Returns the global ImaSdkFactory object.

Send feedback about...

IMA DAI SDK for Android
Need help? Visit our support page.