public class AdSettings
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
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 |
getUrlPrefix()
Gets the url prefix.
|
static boolean |
isChildDirected()
Gets whether the ad control is targeting a child.
|
static boolean |
isTestMode(android.content.Context context)
Gets whether ad controls are working in test mode.
|
static void |
setIsChildDirected(boolean childDirected)
Sets whether the ad control is targeting a child.
|
static void |
setUrlPrefix(java.lang.String urlPrefix)
Sets the url prefix to use when making requests.
|
public static final boolean DEBUG
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(android.content.Context context)
context
- android contextpublic static void setUrlPrefix(java.lang.String urlPrefix)
urlPrefix
- url prefixpublic static java.lang.String getUrlPrefix()
public static void setIsChildDirected(boolean childDirected)
childDirected
- whether the ad control is targeting a childpublic static boolean isChildDirected()