public class AdTargetingOptions
extends java.lang.Object
Constructor and Description |
---|
AdTargetingOptions()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsAdvancedOption(java.lang.String key)
Returns whether an advanced option has been set.
|
AdTargetingOptions |
enableGeoLocation(boolean enable)
If your app or the device is enabled to provide the latitude and longitude
coordinates, you can allow the Amazon Mobile Ads API to send these values
to the Amazon Mobile Ad Network.
|
java.lang.String |
getAdvancedOption(java.lang.String key)
Gets the value of an advanced option.
|
int |
getAge()
Deprecated.
This API has been deprecated and will be removed in a future release.
|
long |
getFloorPrice()
Gets the floor price in micro-dollars
|
boolean |
isGeoLocationEnabled()
Returns the current value of the use geo-location option.
|
AdTargetingOptions |
setAdvancedOption(java.lang.String key,
java.lang.String value)
Sets advanced options using String key/value pairs.
|
AdTargetingOptions |
setAge(int age)
Deprecated.
This API has been deprecated and will be removed in a future release.
|
AdTargetingOptions |
setFloorPrice(long floorPrice)
You can specify a floor price in micro-dollars.
|
public AdTargetingOptions setFloorPrice(long floorPrice)
floorPrice
- the floor price in micro-dollarspublic long getFloorPrice()
public boolean containsAdvancedOption(java.lang.String key)
key
- The key of the advanced option to check for.public java.lang.String getAdvancedOption(java.lang.String key)
key
- The key of the advanced option.public AdTargetingOptions setAdvancedOption(java.lang.String key, java.lang.String value)
key
- The advanced option key.value
- The advanced option value. Passing null will remove the advanced option specified by the key.java.lang.IllegalArgumentException
- if the key is null or empty stringpublic AdTargetingOptions enableGeoLocation(boolean enable)
enable
- True if to use latitude and longitude information when requesting ads, false otherwise.public boolean isGeoLocationEnabled()
public AdTargetingOptions setAge(int age)
age
- the age to setpublic int getAge()