public class AdSettings
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AdSettings.IntegrationErrorMode |
static class |
AdSettings.MultiprocessSupportMode |
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 |
isChildDirected()
Deprecated.
since 5.6, use isMixedAudience
|
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 |
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 |
setIsChildDirected(boolean childDirected)
Deprecated.
since 5.6, use setMixedAudience
|
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 |
setMultiprocessSupportMode(AdSettings.MultiprocessSupportMode mode)
Specify if the SDK can load and show ads in the separate process.
|
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
- public 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()
@Deprecated public static void setIsChildDirected(boolean childDirected)
childDirected
- whether the ad control is targeting a child@Deprecated public static boolean isChildDirected()
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
- public static AdSettings.TestAdType getTestAdType()
public static void setVisibleAnimation(boolean enabled)
public static void setMultiprocessSupportMode(AdSettings.MultiprocessSupportMode mode)
AdSettings.MultiprocessSupportMode
. Default value is
AdSettings.MultiprocessSupportMode.MULTIPROCESS_SUPPORT_MODE_AUTO
public static void setIntegrationErrorMode(AdSettings.IntegrationErrorMode mode)
AdSettings.IntegrationErrorMode