public class OpenWrapSDK
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
OpenWrapSDK.LogLevel
Log levels to filter logs
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
KEY_AD_SERVER_CUSTOM_DATA
Key to define the custom data to be forwarded to primary ad server SDK
|
static java.lang.String |
KEY_SELECTED_REWARD
Key to define the selected reward among multiple configured rewards
|
| Constructor and Description |
|---|
OpenWrapSDK() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addExternalUserId(POBExternalUserId userId)
API to Add the External user id /Data Partner ids which helps publisher in better user targeting
|
static void |
allowAdvertisingId(boolean allow)
Indicates whether Android advertisement ID should be sent in the request or not.
|
static void |
allowLocationAccess(boolean allow)
Used to enable/disable location access.
|
static POBApplicationInfo |
getApplicationInfo()
Gets Application info set by publisher to OpenWrap SDK
|
static java.util.List<POBExternalUserId> |
getExternalUserIds()
API to get all set external user ids
|
static POBUserInfo |
getUserInfo()
Gets user info set by publisher to OpenWrap SDK
|
static java.lang.String |
getVersion()
Returns the OpenWrap SDK's version.
|
static void |
removeAllExternalUserIds()
API to remove all external user ids
|
static void |
removeExternalUserIds(java.lang.String source)
API to remove the external user ids of a particular source
|
static void |
setApplicationInfo(POBApplicationInfo applicationInfo)
Sets Application information, which contains various attributes about app, such as
application category, store URL, domain, etc for more relevant ads.
|
static void |
setCCPA(java.lang.String ccpaString)
Set the CCPA compliant string, it helps publisher toward compliance with the California Consumer Privacy Act (CCPA).
|
static void |
setCoppa(boolean coppaState)
Indicates whether the visitor is COPPA-specific or not.
|
static void |
setGDPRConsent(java.lang.String gdprConsent)
Sets GDPR consent string, A valid Base64 encoded consent string as per
https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework.
|
static void |
setGDPREnabled(boolean gdpr)
Sets GDPR compliance, it indicates whether or not the ad request is GDPR(General Data Protection Regulation) compliant.
|
static void |
setLocation(POBLocation location)
Sets user's location and its source.
|
static void |
setLogLevel(OpenWrapSDK.LogLevel level)
Sets log level across all ad formats.
|
static void |
setSSLEnabled(boolean requestSecureCreative)
Enable/disable secure ad calls.
|
static void |
setUseInternalBrowser(boolean internalBrowserState)
Tells OpenWrap SDK to use internal SDK browser, instead of the default device browser,
for opening landing pages when the user clicks on an ad.
|
static void |
setUserInfo(POBUserInfo userInfo)
Sets user information, such as birth year, gender, region, etc for more relevant ads.
|
public static final java.lang.String KEY_SELECTED_REWARD
public static final java.lang.String KEY_AD_SERVER_CUSTOM_DATA
public static void setLogLevel(OpenWrapSDK.LogLevel level)
OpenWrapSDK.LogLevellevel - log level to set.public static java.lang.String getVersion()
public static void allowLocationAccess(boolean allow)
The default value is true.
allow - enable or disable location access behaviorpublic static void setUseInternalBrowser(boolean internalBrowserState)
internalBrowserState - boolean value that enables/disables the use of internal browser.public static void setLocation(POBLocation location)
If your application is already accessing the device location, it is highly recommended to set the location coordinates inferred from the device GPS. If you are inferring location from any other source, make sure you set the appropriate location source.
location - User's current locationpublic static void setCoppa(boolean coppaState)
coppaState - Visitor state for COPPA compliance.public static void setSSLEnabled(boolean requestSecureCreative)
By default, OpenWrap SDK initiates secure ad calls from an application to the ad server and delivers only secure ads. You can allow non secure ads by passing false to this method.
requestSecureCreative - false for disable secure creative mode. Default is set to true.public static void allowAdvertisingId(boolean allow)
Possible values are: true : Advertisement id will be sent in the request. false : Advertisement id will not be sent in the request.
allow - state of advertisement id usagepublic static void setApplicationInfo(POBApplicationInfo applicationInfo)
applicationInfo - Instance of POBApplicationInfo class with required application details@Nullable public static POBApplicationInfo getApplicationInfo()
public static void setUserInfo(POBUserInfo userInfo)
userInfo - Instance of POBUserInfo class with required user details@Nullable public static POBUserInfo getUserInfo()
public static void setGDPREnabled(boolean gdpr)
gdpr - boolean value
- true : indicates GDPR compliant requests
- false : indicates that the request is not GDPR compliant
By default, this parameter is omitted in the ad request, indicating Unknown.public static void setGDPRConsent(java.lang.String gdprConsent)
gdprConsent - consent string to convey user consent when GDPR regulations are in effect.public static void setCCPA(java.lang.String ccpaString)
If this is not set, SDK looks for app's default SharedPreference with key 'IABUSPrivacy_String' If CCPA is applied through both options, the SDK will honour only API property. If both are not set then CCPA parameter is omitted from an ad request.
ccpaString - is the CCPA compliant stringpublic static void addExternalUserId(@NonNull
POBExternalUserId userId)
userId - instance of POBExternalUserId class@NonNull public static java.util.List<POBExternalUserId> getExternalUserIds()
public static void removeExternalUserIds(@NonNull
java.lang.String source)
source - name of sourcepublic static void removeAllExternalUserIds()