public class AdSettings
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AdSettings.IntegrationErrorMode |
static class |
AdSettings.TestAdType
Ad Type to be returned when test mode is on.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG
Deprecated.
Use
setDebugBuild(boolean) } instead. |
Constructor and Description |
---|
AdSettings() |
Modifier and Type | Method and Description |
---|---|
static void |
addTestDevice(java.lang.String deviceIdHash)
Adds a test device.
|
static void |
addTestDevices(java.util.Collection<java.lang.String> deviceIdHashes)
Adds a collection of test devices.
|
static void |
clearTestDevices()
Clears the collection of test devices.
|
static java.lang.String |
getMediationService()
Returns the name of the mediation service that is mediating Audience Network
|
static AdSettings.TestAdType |
getTestAdType() |
static java.lang.String |
getUrlPrefix()
Gets the url prefix.
|
static boolean |
isMixedAudience()
Gets whether the ad control is targeting a mixed audience.
|
static boolean |
isTestMode(Context context)
Gets whether ad controls are working in test mode.
|
static boolean |
isVideoAutoplay()
Gets whether video autoplay is enabled
|
static boolean |
isVideoAutoplayOnMobile()
Gets whether video autoplay is only enabled on Wifi or not
|
static void |
setDataProcessingOptions(java.lang.String[] options)
Data processing options.
|
static void |
setDataProcessingOptions(java.lang.String[] options,
int country,
int state)
Data processing options.
|
static void |
setDebugBuild(boolean isDebugBuild)
Puts the SDK in debug mode
|
static void |
setIntegrationErrorMode(AdSettings.IntegrationErrorMode mode)
Specify behaviour of the SDK when client code has an integration error.
|
static void |
setMediationService(java.lang.String mediationService)
Sets the name of the mediation service that is mediating Audience Network.
|
static void |
setMixedAudience(boolean mixedAudience)
Sets whether the ad control is targeting a mixed audience.
|
static void |
setTestAdType(AdSettings.TestAdType testAdType) |
static void |
setTestMode(boolean enabled)
Sets whether ad controls are working in test mode.
|
static void |
setUrlPrefix(java.lang.String urlPrefix)
Sets the url prefix to use when making requests.
|
static void |
setVideoAutoplay(boolean enabled)
Sets the setting for video autoplay
|
static void |
setVideoAutoplayOnMobile(boolean enabled)
Sets the setting for video autoplay on mobile networks
|
static void |
setVisibleAnimation(boolean enabled) |
static void |
turnOnSDKDebugger(Context context)
This is a feature in testing not currently supported
|
public static final boolean DEBUG
setDebugBuild(boolean)
} instead.public static void setDebugBuild(boolean isDebugBuild)
This is useful for getting debug messages printed to logcat.
public static void turnOnSDKDebugger(Context context)
context
- android contextpublic static void addTestDevice(java.lang.String deviceIdHash)
Copy the current device Id from debug log and add it as a test device to get test ads. Apps
running on emulator will automatically get test ads. Test devices should be added before Ad.loadAd()
is called.
deviceIdHash
- id of the device to use test mode, can be obtained from debug logpublic static void addTestDevices(java.util.Collection<java.lang.String> deviceIdHashes)
Copy the current device Id from debug log and add it as a test device to get test ads. Apps
running on emulator will automatically get test ads. Test devices should be added before Ad.loadAd()
is called.
deviceIdHashes
- ids of the device to use test mode, can be obtained from debug logpublic static void clearTestDevices()
public static boolean isTestMode(Context context)
context
- android contextpublic static void setTestMode(boolean enabled)
enabled
- test mode statepublic static void setUrlPrefix(java.lang.String urlPrefix)
urlPrefix
- url prefixpublic static java.lang.String getUrlPrefix()
public static boolean isVideoAutoplay()
public static boolean isVideoAutoplayOnMobile()
public static void setVideoAutoplay(boolean enabled)
enabled
- whether video autoplay should be enabled or notpublic static void setVideoAutoplayOnMobile(boolean enabled)
enabled
- whether video autoplay should be enabled only on Wifipublic static void setMediationService(java.lang.String mediationService)
If an ad provider service is mediating Audience Network in their sdk, it is required to set the name of the mediation service.
mediationService
- string representing the name of the mediation service that is mediating
Audience Networkpublic static java.lang.String getMediationService()
public static void setMixedAudience(boolean mixedAudience)
mixedAudience
- whether the ad control is targeting a mixed audiencepublic static boolean isMixedAudience()
public static void setTestAdType(AdSettings.TestAdType testAdType)
testAdType
- Ad Type to be loaded when test mode is on.public static AdSettings.TestAdType getTestAdType()
public static void setVisibleAnimation(boolean enabled)
public static void setIntegrationErrorMode(AdSettings.IntegrationErrorMode mode)
AdSettings.IntegrationErrorMode
public static void setDataProcessingOptions(java.lang.String[] options)
options
- Processing options you would like to enable for a specific event. Use an empty
array to explicitly specify that this event should be processed without specific
restrictions. See the documentation above for a full list of accepted values.public static void setDataProcessingOptions(java.lang.String[] options, int country, int state)
options
- Processing options you would like to enable for a specific event. Use an empty
array to explicitly specify that this event should be processed without specific
restirctioins. See the documentation above for a full list of accepted values.country
- A country that you want to associate to this data processing option. Use 0 to
request that we geolocate that event or see the documentation above for a full list of
accepted values.state
- A state that you want to associate with this data processing option. Use 0 to
request that we geolocate that event or see the documentation above for a full list of
accepted values.