public class TargetingParams
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TargetingParams.GENDER |
| Modifier and Type | Method and Description |
|---|---|
static void |
addAppKeywords(java.lang.String keyword)
Deprecated.
|
static void |
addUserKeyword(java.lang.String keyword)
Deprecated.
use
setUserTargeting(String, String) instead |
static void |
clearAppKeywords()
Deprecated.
|
static void |
clearUserKeywords()
Clear the keywords for user
|
static java.util.ArrayList<java.lang.String> |
getAppKeywords()
Deprecated.
|
static java.lang.String |
getBundleName()
Get the platform-specific identifier, should be bundle/package name
|
static java.lang.String |
getDomain()
Get the domain of your app
|
static TargetingParams.GENDER |
getGender()
Get the current user's gender, if it's available.
|
static Location |
getLocation()
Retrieve the location that's set by setLocation()
|
static int |
getLocationDecimalDigits()
Get the digits after the decimal of the latitude and longitude.
|
static boolean |
getLocationEnabled()
Returns true if the Prebid sdk is allowed to use location information
or false otherwise.
|
static int |
getPrivacyPolicy()
Get whether the app has a privacy policy
|
static java.lang.String |
getStoreUrl()
Get the store url of your app
|
static java.util.ArrayList<java.lang.String> |
getUserKeywords()
Get the keywords for user
|
static int |
getYearOfBirth()
Get the year of birth for targeting
|
static void |
removeAppKeyword(java.lang.String keyword)
Deprecated.
|
static void |
removeUserKeyword(java.lang.String keyword)
Remove one keyword to user related keywords
|
static void |
setAppKeywords(java.util.ArrayList<java.lang.String> appKeywords)
Deprecated.
|
static void |
setBundleName(java.lang.String bundleName)
Set the platform-specific identifier for targeting purpose
Should be bundle/package name
|
static void |
setDomain(java.lang.String domain)
Set the domain of your app for targeting purpose
|
static void |
setGender(TargetingParams.GENDER gender)
Set the user's gender.
|
static void |
setLocation(Location locationData)
Set the location for demand sources to target
|
static void |
setLocationDecimalDigits(int digitsAfterDecimal)
Sets the number of digits after the decimal of the latitude and longitude.
|
static void |
setLocationEnabled(boolean enabled)
Sets whether or not location (latitude, longitude) is retrieved through provider and
shared with 3rd party networks.
|
static void |
setPrivacyPolicy(int privacyPolicy)
Set whether the app has a privacy policy, where 0 = no, 1 = yes
|
static void |
setStoreUrl(java.lang.String storeUrl)
Set the store url of your app
|
static void |
setUserKeywords(java.util.ArrayList<java.lang.String> userKeywords)
Deprecated.
use
setUserTargeting(String, String) instead |
static void |
setUserTargeting(java.lang.String key,
java.lang.String value)
Set a key-value pair as a keyword, this will be sent in the user object in the ORTB request
An exmpale, if you call setUserTargeting("key1", "value1") and setUserTargeting("key2", null),
values that will be sent are "key1=value1,key2,"
|
static void |
setYearOfBirth(int yob)
Set the year of birth for targeting
|
public static int getYearOfBirth()
public static void setYearOfBirth(int yob)
yob - yob of the userpublic static TargetingParams.GENDER getGender()
public static void setGender(TargetingParams.GENDER gender)
gender - The user's gender.public static void setLocationEnabled(boolean enabled)
enabled - default is false.public static boolean getLocationEnabled()
public static Location getLocation()
public static void setLocation(Location locationData)
locationData - location of the userpublic static int getLocationDecimalDigits()
public static void setLocationDecimalDigits(int digitsAfterDecimal)
getLocationEnabled().
Maximum of precision is 6, which means less than a foot.digitsAfterDecimal - The digits@Deprecated public static void setAppKeywords(java.util.ArrayList<java.lang.String> appKeywords)
appKeywords - list of keywords@Deprecated public static java.util.ArrayList<java.lang.String> getAppKeywords()
@Deprecated public static void clearAppKeywords()
@Deprecated public static void addAppKeywords(java.lang.String keyword)
keyword - keyword to be added@Deprecated public static void removeAppKeyword(java.lang.String keyword)
keyword - keyword to be added@Deprecated public static void setUserKeywords(java.util.ArrayList<java.lang.String> userKeywords)
setUserTargeting(String, String) insteaduserKeywords - @Deprecated public static void addUserKeyword(java.lang.String keyword)
setUserTargeting(String, String) insteadkeyword - keyword to be addedpublic static void setUserTargeting(java.lang.String key,
java.lang.String value)
key - key in the key-value pair, should not be nullvalue - value in the key-value pair, can be nullpublic static java.util.ArrayList<java.lang.String> getUserKeywords()
public static void clearUserKeywords()
public static void removeUserKeyword(java.lang.String keyword)
keyword - keyword to be removedpublic static java.lang.String getBundleName()
public static void setBundleName(java.lang.String bundleName)
public static void setDomain(java.lang.String domain)
domain - domain of your apppublic static java.lang.String getDomain()
public static void setStoreUrl(java.lang.String storeUrl)
storeUrl - store urlpublic static java.lang.String getStoreUrl()
public static void setPrivacyPolicy(int privacyPolicy)
privacyPolicy - default value is 0public static int getPrivacyPolicy()