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.

Constant Summary

int DEFAULT_MAX_REDIRECTS

Public Method Summary

abstract boolean
getAutoPlayAdBreaks()
Specifies whether VMAP and ad rules ad breaks are automatically played.
abstract String
getLanguage()
Gets the current ISO 639-1 language code.
abstract int
getMaxRedirects()
Returns the maximum number of VAST redirects.
abstract String
getPlayerType()
Returns the partner provided player type.
abstract String
getPlayerVersion()
Returns the partner provided player version.
abstract String
abstract boolean
isDebugMode()
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
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
setPpid(String ppid)
Sets the publisher provided ID used for tracking.
abstract String
toString()
Returns a string representation of this ImaSdkSettings.

Constants

public static final int DEFAULT_MAX_REDIRECTS

Constant Value: 4

Public Methods

public abstract boolean getAutoPlayAdBreaks ()

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

Default is TRUE

public 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

public abstract int getMaxRedirects ()

Returns the maximum number of VAST redirects. Also see setMaxRedirects(int).

public abstract String getPlayerType ()

Returns the partner provided player type.

Returns
  • {String} Partner player type.

public abstract String getPlayerVersion ()

Returns the partner provided player version.

Returns
  • {String} Partner player version.

public abstract String getPpid ()

Returns
  • the ppid.

public abstract boolean isDebugMode ()

Gets the debug mode.

Default is FALSE

public abstract void setAutoPlayAdBreaks (boolean autoPlayAdBreaks)

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

Parameters
autoPlayAdBreaks

public abstract void setDebugMode (boolean debugMode)

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

Parameters
debugMode Whether to enable debug mode or not.

public 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.

Parameters
language

public 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
maxRedirects the maximum number of redirects to allow.

public 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
playerType

public 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
playerVersion

public abstract void setPpid (String ppid)

Sets the publisher provided ID used for tracking.

Parameters
ppid the ppid to set.

public abstract String toString ()

Returns a string representation of this ImaSdkSettings.