Class POBSDKConfig
-
- All Implemented Interfaces:
public class POBSDKConfigThis class is used for setting configuration parameters for OpenWrap SDK level i.e state needs to be applied for all ads supported by SDK
-
-
Field Summary
Fields Modifier and Type Field Description public longlocationDetectionDurationInMillispublic POBLocationlocationpublic POBUserInfouserInfopublic POBApplicationInfoapplicationInfopublic POBDSAComplianceStatusdsaComplianceStatus
-
Method Summary
Modifier and Type Method Description longgetLocationDetectionDurationInMillis()Returns time interval used to get the two consecutive location voidsetLocationDetectionDurationInMillis(long durationInMillis)Sets the duration for retrieving the location of user. POBLocationgetLocation()voidsetLocation(@Nullable() POBLocation location)POBUserInfogetUserInfo()voidsetUserInfo(@Nullable() POBUserInfo userInfo)Sets the user's information. POBApplicationInfogetApplicationInfo()voidsetApplicationInfo(@Nullable() POBApplicationInfo applicationInfo)Sets the application information. POBDSAComplianceStatusgetDsaComplianceStatus()Get the DSA required flag voidsetDSAComplianceStatus(@NonNull() POBDSAComplianceStatus dsaComplianceStatus)Set the DSA required flag booleanisLocationAccessAllowed()Determines if location detection is enabled. voidallowLocationAccess(boolean allow)Enables or disable SDK location detection. booleanisUseInternalBrowser()Returns true if landing page for an ad would opened in internal browser else returns false BooleanisCoppa()voidsetCoppa(boolean coppaState)Sets COPPA state. booleanisRequestSecureCreative()booleanisAllowAdvertisingId()voidallowAdvertisingId(boolean allow)Indicates whether Advertisement ID should be sent in the request. <T> TgetMeasurementProvider(@NonNull() String className)Method to get OM measurement provider instance voidaddExternalUserId(@NonNull() POBExternalUserId userId)Adds the External user id /Data Partner ids which helps publisher in better user targeting Map<String, List<POBExternalUserId>>getExternalUserIds()Get the map of User defined data partner ids voidremoveExternalUserIds(@NonNull() String source)removes the Data partner ids of a particular source voidremoveAllExternalUserIds()removes all data partner ids voidsetUseInternalBrowser(boolean internalBrowserState)Set to true if landing page for an ad should be opened in internal browser else set to false. voidsetRequestSecureCreative(boolean requestSecureCreative)Requests secure ads from ad server using https protocol. -
-
Method Detail
-
getLocationDetectionDurationInMillis
long getLocationDetectionDurationInMillis()
Returns time interval used to get the two consecutive location
- Returns:
time interval in milli second
-
setLocationDetectionDurationInMillis
void setLocationDetectionDurationInMillis(long durationInMillis)
Sets the duration for retrieving the location of user. Default value is 10 seconds.
- Parameters:
durationInMillis- time in milli second
-
getLocation
@Nullable() POBLocation getLocation()
-
setLocation
void setLocation(@Nullable() POBLocation location)
-
getUserInfo
@Nullable() POBUserInfo getUserInfo()
-
setUserInfo
void setUserInfo(@Nullable() POBUserInfo userInfo)
Sets the user's information. It would be useful in delivering user relevant ads
- Parameters:
userInfo- value of POBUserInfo type
-
getApplicationInfo
@Nullable() POBApplicationInfo getApplicationInfo()
-
setApplicationInfo
void setApplicationInfo(@Nullable() POBApplicationInfo applicationInfo)
Sets the application information. It would be useful in delivering application relevant ads
- Parameters:
applicationInfo- value of POBApplicationInfo type
-
getDsaComplianceStatus
@NonNull() POBDSAComplianceStatus getDsaComplianceStatus()
Get the DSA required flag
- Returns:
value of DSA required flag
-
setDSAComplianceStatus
void setDSAComplianceStatus(@NonNull() POBDSAComplianceStatus dsaComplianceStatus)
Set the DSA required flag
- Parameters:
dsaComplianceStatus- value of DSA required flag
-
isLocationAccessAllowed
boolean isLocationAccessAllowed()
Determines if location detection is enabled. If enabled, the SDK will use the location services of the device to determine the device's location ad add ad request parameters (lat/long) to the ad request. Location detection can be enabled with allowLocationAccess() or enableLocationDetection().
- Returns:
true if location detection is enabled, false if not
-
allowLocationAccess
void allowLocationAccess(boolean allow)
Enables or disable SDK location detection. If enabled with this method the most battery optimized settings are used. This method is used to disable location detection for either method of enabling location detection. Default value is true.
Permissions for coarse or fine location detection may be required.
- Parameters:
allow- enable or disable auto location detection
-
isUseInternalBrowser
boolean isUseInternalBrowser()
Returns true if landing page for an ad would opened in internal browser else returns false
- Returns:
State of internal browser
-
setCoppa
void setCoppa(boolean coppaState)
Sets COPPA state. It indicates whether the visitor is COPPA-specific or not. For COPPA (Children's Online Privacy Protection Act) compliance, if the visitor's age is below 13, then such visitors should not be served targeted ads. Possible options are: false - Indicates that the visitor is not COPPA-specific and can be served targeted ads. true - Indicates that the visitor is COPPA-specific and should be served only COPPA-compliant ads.
- Parameters:
coppaState- Coppa state
-
isRequestSecureCreative
boolean isRequestSecureCreative()
-
isAllowAdvertisingId
boolean isAllowAdvertisingId()
-
allowAdvertisingId
void allowAdvertisingId(boolean allow)
Indicates whether Advertisement ID should be sent in the request. Possible values are: true : Advertisement id will be sent in the request. false : Android ID will be sent in the request instead of the Advertisement id. Default value is true
- Parameters:
allow- state of advertisement id usage
-
getMeasurementProvider
@Nullable() <T> T getMeasurementProvider(@NonNull() String className)
Method to get OM measurement provider instance
- Parameters:
className- name of measurement provider class- Returns:
reference of measurement provider T
-
addExternalUserId
void addExternalUserId(@NonNull() POBExternalUserId userId)
Adds the External user id /Data Partner ids which helps publisher in better user targeting
- Parameters:
userId- instance of POBExternalUserId class
-
getExternalUserIds
@NonNull() Map<String, List<POBExternalUserId>> getExternalUserIds()
Get the map of User defined data partner ids
- Returns:
Map of Data partner ids
-
removeExternalUserIds
void removeExternalUserIds(@NonNull() String source)
removes the Data partner ids of a particular source
- Parameters:
source- name of source
-
removeAllExternalUserIds
void removeAllExternalUserIds()
removes all data partner ids
-
setUseInternalBrowser
void setUseInternalBrowser(boolean internalBrowserState)
Set to true if landing page for an ad should be opened in internal browser else set to false. Starting with SDK v2.7.0, default value is false. Prior, it was true.
- Parameters:
internalBrowserState- value of boolean type
-
setRequestSecureCreative
void setRequestSecureCreative(boolean requestSecureCreative)
Requests secure ads from ad server using https protocol.
- Parameters:
requestSecureCreative- true for enable secure creative mode.
-
-
-
-