Android Verizon Ads SDK Standard Edition Documentation  1.14
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 boolean isApplicationInBackground ()
 This method can be used to determine if the application is in the background. 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 setDataPrivacy (final DataPrivacy dataPrivacy)
 Use this method to set DataPrivacy to be used on all ad and bid requests. More...
 
static DataPrivacy getDataPrivacy ()
 Provides access to the DataPrivacy that applies to ad requests. 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...
 
static String getBiddingToken (Context context)
 Use this method to retrieve a bidding token. 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

◆ getBiddingToken()

static String getBiddingToken ( Context  context)
static

Use this method to retrieve a bidding token.

Parameters
contextAn Android Context instance. Cannot be null.
Returns
the bidding token or null if the SDK has not been initialized.

◆ getDataPrivacy()

static DataPrivacy getDataPrivacy ( )
static

Provides access to the DataPrivacy that applies to ad requests.

Returns
the instance of DataPrivacy that will be used to control what data is sent when requesting ads. Will not be null.

◆ 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.

◆ 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.

◆ isApplicationInBackground()

static boolean isApplicationInBackground ( )
static

This method can be used to determine if the application is in the background.

Returns
true if application is in the background; 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

◆ setDataPrivacy()

static void setDataPrivacy ( final DataPrivacy  dataPrivacy)
static

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

Parameters
dataPrivacythe DataPrivacy to use for all ad requests.

◆ 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.