ImaSdkSettings

public interface ImaSdkSettings


Defines general SDK settings that are used when creating an AdsLoader. ImaSdkSettings object should not be modified after AdsLoader is constructed; however it can be reused to construct new AdsLoader instances. createAdsLoadercreateAdsLoader

Summary

Constants

default static final int

Public methods

abstract boolean

Specifies whether VMAP and ad rules ad breaks are automatically played.

abstract Map<StringString>

Returns the feature flags and their states as set by the setFeatureFlags function.

abstract String

Gets the current ISO 639-1 language code.

abstract int

Returns the maximum number of VAST redirects.

abstract String

Returns the partner provided player type.

abstract String

Returns the partner provided player version.

abstract String
abstract String

Returns the session ID if set.

abstract boolean

Gets the debug mode.

abstract void
setAutoPlayAdBreaks(boolean autoPlayAdBreaks)

Sets whether to automatically play VMAP and ad rules ad breaks.

abstract void
setDebugMode(boolean debugMode)

Enables and disables the debug mode, which is disabled by default.

abstract void
setFeatureFlags(Map<StringString> featureFlags)

Sets the feature flags and their states to control experimental features.

abstract void
setLanguage(String language)

Sets the preferred language for the ad UI.

abstract void
setMaxRedirects(int maxRedirects)

Specifies the maximum number of redirects before the subsequent redirects will be denied and the ad load aborted.

abstract void
setPlayerType(String playerType)

Sets the partner provided player type.

abstract void
setPlayerVersion(String playerVersion)

Sets the partner provided player version.

abstract void

Sets the publisher provided ID used for tracking.

abstract void
setSessionId(String sessionId)

Session ID is a temporary random ID.

abstract String

Returns a string representation of this ImaSdkSettings.

Constants

DEFAULT_MAX_REDIRECTS

default static final int DEFAULT_MAX_REDIRECTS = 4

Public methods

getAutoPlayAdBreaks

abstract boolean getAutoPlayAdBreaks()

Specifies whether VMAP and ad rules ad breaks are automatically played.

Default is TRUE

getFeatureFlags

abstract Map<StringStringgetFeatureFlags()

Returns the feature flags and their states as set by the setFeatureFlags function.

getLanguage

abstract String getLanguage()

Gets the current ISO 639-1 language code. Defaults to "en" for English.

See also
"http://www.loc.gov/standards/iso639-2/php/English_list.php"

getMaxRedirects

abstract int getMaxRedirects()

Returns the maximum number of VAST redirects. Also see setMaxRedirects.

getPlayerType

abstract String getPlayerType()

Returns the partner provided player type.

Returns
String

{String} Partner player type.

getPlayerVersion

abstract String getPlayerVersion()

Returns the partner provided player version.

Returns
String

{String} Partner player version.

getPpid

abstract String getPpid()
Returns
String

the ppid.

getSessionId

abstract String getSessionId()

Returns the session ID if set.

Returns
String

{String} The session ID.

isDebugMode

abstract boolean isDebugMode()

Gets the debug mode.

Default is FALSE

setAutoPlayAdBreaks

abstract void setAutoPlayAdBreaks(boolean autoPlayAdBreaks)

Sets whether to automatically play VMAP and ad rules ad breaks.

Parameters
boolean autoPlayAdBreaks

{boolean} Whether to autoPlay the ad breaks.

setDebugMode

abstract void setDebugMode(boolean debugMode)

Enables and disables the debug mode, which is disabled by default.

Parameters
boolean debugMode

Whether to enable debug mode or not.

setFeatureFlags

abstract void setFeatureFlags(Map<StringString> featureFlags)

Sets the feature flags and their states to control experimental features. This should be set as early as possible, before requesting ads. Settings will remain constant until the next ad request. Calling this method again will reset any feature flags for the next ad request.

setLanguage

abstract void setLanguage(String language)

Sets the preferred language for the ad UI. The supported codes can be found in the Localization guide and are closely related to the two-letter ISO 639-1 language codes. If invalid or unsupported, the language will default to "en" for English. Once the AdsLoader object has been created, using this setter will have no effect.

setMaxRedirects

abstract void setMaxRedirects(int maxRedirects)

Specifies the maximum number of redirects before the subsequent redirects will be denied and the ad load aborted. In this case, the ad will raise an error with error code 302. The number of redirects directly affects latency and thus user experience. This applies to all VAST wrapper ads. The default is DEFAULT_MAX_REDIRECTS.

Parameters
int maxRedirects

the maximum number of redirects to allow.

setPlayerType

abstract void setPlayerType(String playerType)

Sets the partner provided player type. This setting should be used to specify the name of the player being integrated with the SDK. Player type greater than 20 characters will be truncated. The player type specified should be short and unique. This is an optional setting used to improve SDK usability by tracking player types.

Example:

settings.setPlayerType("google/gmf-player");
Parameters
String playerType

{String} The type of the partner player.

setPlayerVersion

abstract void setPlayerVersion(String playerVersion)

Sets the partner provided player version. This setting should be used to specify the version of the partner player being integrated with the SDK. Player versions greater than 20 characters will be truncated. This is an optional setting used to improve SDK usability by tracking player version.

Example:

settings.setPlayerVersion("1.0.0");
Parameters
String playerVersion

{String} The version of the partner player.

setPpid

abstract void setPpid(String ppid)

Sets the publisher provided ID used for tracking.

Parameters
String ppid

the ppid to set.

setSessionId

abstract void setSessionId(String sessionId)

Session ID is a temporary random ID. It is used exclusively for frequency capping. A session ID must be a UUID, or an empty string if the SDK should not send a session ID.

Parameters
String sessionId

{String} A temporary UUID used for frequency capping.

toString

abstract String toString()

Returns a string representation of this ImaSdkSettings.