Android Verizon Ads SDK Standard Edition Documentation  1.1
List of all members
VASAds Class Reference

Contains APIs for interacting with core functionality of the SDK, such as setting location, enabling COPPA and initializing the SDK. More...

VASAds API

The API refers to the portion of this interface that is exposed for the purpose of integrating ad monetization into the application.

static synchronized boolean initialize (final Application application, final String siteId)
 Call this method to initialize the Verizon Ads SDK with your site ID. More...
 
static boolean isInitialized ()
 This method can be used to determine if the Verizon Ads SDK has been initialized. More...
 
static SDKInfo getSDKInfo ()
 This method will return an SDKInfo instance that be used to get build and version information for this instance of the SDK. More...
 
static String getSiteId ()
 This method provides access to the site ID value provided when the SDK was initialized. More...
 
static void setLocationEnabled (final boolean locationEnabled)
 This method can be used to notify SDK components that they must not access the user's location. More...
 
static boolean isLocationEnabled ()
 Use this method to determine if location access has been enabled or disabled. More...
 
static void setLogLevel (final int logLevel)
 Use this method to set the log level for the SDK. More...
 
static int getLogLevel ()
 Get the current log level for the SDK. More...
 
static void setRequestMetadata (final RequestMetadata requestMetadata)
 Use this method to set RequestMetadata to be used on all ad and bid requests. More...
 
static RequestMetadata getRequestMetadata ()
 Provides access to the RequestMetadata that has been set for all ad requests. More...
 
static void setConsentData (final Map< String, String > consentData, final boolean restrictedOrigin)
 This method is used to provide user privacy consent data as well as to indicate if the user originates from a privacy restricted zone such as the EU. More...
 
static boolean isAnonymous ()
 Returns true or false to indicate whether the user's personal data should be collected. More...
 
static void setCoppa (final boolean compliance)
 Set to true to indicate to ad buyers that COPPA (Children's Online Privacy Protection Act) restrictions need to be enforced for requests from this user. More...
 
static Boolean getCoppa ()
 Gets the COPPA (Children’s Online Privacy Protection Act) enabled value for the application. More...
 
static boolean isShareAdvertiserIdEnabled ()
 Indicates whether a creative can access the user's advertiser ID. More...
 
static void setShareAdvertiserIdEnabled (final boolean shareAdvertiserIdEnabled)
 Sets whether or not a creative can access the user's advertiser id More...
 
static boolean isShareApplicationIdEnabled ()
 Indicates whether a creative can access the host application's id. More...
 
static void setShareApplicationIdEnabled (final boolean shareApplicationIdEnabled)
 Sets whether or not a creative can access the host application's id More...
 

Detailed Description

Contains APIs for interacting with core functionality of the SDK, such as setting location, enabling COPPA and initializing the SDK.

Member Function Documentation

◆ getCoppa()

static Boolean getCoppa ( )
static

Gets the COPPA (Children’s Online Privacy Protection Act) enabled value for the application.

Returns
true if coppa compliance must be enforced, false if it must not and null if it was not specified.

◆ getLogLevel()

static int getLogLevel ( )
static

Get the current log level for the SDK.

Returns
the current SDK log level

◆ getRequestMetadata()

static RequestMetadata getRequestMetadata ( )
static

Provides access to the RequestMetadata that has been set for all ad requests.

Returns
the instance of RequestMetadata that was set; null if it has not been set.

◆ getSDKInfo()

static SDKInfo getSDKInfo ( )
static

This method will return an SDKInfo instance that be used to get build and version information for this instance of the SDK.

Returns
an SDKInfo instance. Will not be null.

◆ getSiteId()

static String getSiteId ( )
static

This method provides access to the site ID value provided when the SDK was initialized.

See VASAds#initialize(Application, String).

Returns
the site Id from initialization; null if not initialized.

◆ initialize()

static synchronized boolean initialize ( final Application  application,
final String  siteId 
)
static

Call this method to initialize the Verizon Ads SDK with your site ID.

This method must be called from within a subclass of Application. This method must be called before using any other components of the SDK API. This call may return false if you attempt to call initialize again with a new site ID after the SDK has already been successfully initialized.

Parameters
applicationa valid Application instance; cannot be null.
siteIdyour site ID
Returns
true if the call to initialize succeeds; otherwise false.

◆ isAnonymous()

static boolean isAnonymous ( )
static

Returns true or false to indicate whether the user's personal data should be collected.

When true is returned, components must not collect any personal user data.

Returns
true if user data must not be collected; false otherwise.

◆ isInitialized()

static boolean isInitialized ( )
static

This method can be used to determine if the Verizon Ads SDK has been initialized.

Returns
true if initialized; false otherwise.

◆ isLocationEnabled()

static boolean isLocationEnabled ( )
static

Use this method to determine if location access has been enabled or disabled.

Returns
true if location access is enabled; false otherwise.

◆ isShareAdvertiserIdEnabled()

static boolean isShareAdvertiserIdEnabled ( )
static

Indicates whether a creative can access the user's advertiser ID.

Returns
true if the creative can; otherwise false. Default value: false

◆ isShareApplicationIdEnabled()

static boolean isShareApplicationIdEnabled ( )
static

Indicates whether a creative can access the host application's id.

Returns
true if the creative can; otherwise false. Default value: false

◆ setConsentData()

static void setConsentData ( final Map< String, String consentData,
final boolean  restrictedOrigin 
)
static

This method is used to provide user privacy consent data as well as to indicate if the user originates from a privacy restricted zone such as the EU.

Parameters
consentDataa map of key/value pairs that contain a mapping of a user consent data identifier to the consent data
restrictedOrigintrue if the user originates from a privacy restricted zone such as the EU; false otherwise.

◆ setCoppa()

static void setCoppa ( final boolean  compliance)
static

Set to true to indicate to ad buyers that COPPA (Children's Online Privacy Protection Act) restrictions need to be enforced for requests from this user.

Parameters
complianceWhether COPPA compliance is enforced.

◆ setLocationEnabled()

static void setLocationEnabled ( final boolean  locationEnabled)
static

This method can be used to notify SDK components that they must not access the user's location.

Location access is enabled by default.

Parameters
locationEnabledpass true if SDK components can access location; false to block access.

◆ setLogLevel()

static void setLogLevel ( final int  logLevel)
static

Use this method to set the log level for the SDK.

Parameters
logLevelthe desired log level.

◆ setRequestMetadata()

static void setRequestMetadata ( final RequestMetadata  requestMetadata)
static

Use this method to set RequestMetadata to be used on all ad and bid requests.

This may be overridden on an individual ad request.

Parameters
requestMetadatathe RequestMetadata to use for all ad requests if one is not specified at request time.

◆ setShareAdvertiserIdEnabled()

static void setShareAdvertiserIdEnabled ( final boolean  shareAdvertiserIdEnabled)
static

Sets whether or not a creative can access the user's advertiser id

Parameters
shareAdvertiserIdEnabledtrue indicates that a creative can access; false otherwise.

◆ setShareApplicationIdEnabled()

static void setShareApplicationIdEnabled ( final boolean  shareApplicationIdEnabled)
static

Sets whether or not a creative can access the host application's id

Parameters
shareApplicationIdEnabledtrue indicates that a creative can access; false otherwise.