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_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 |
setCoppa(boolean coppaState)
Indicates whether the visitor is COPPA-specific or not.
|
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 the 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 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)
From version 2.7.0, the default behaviour changed to using device's default browser
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 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()