Request parameters

Last updated on May 11, 2018

OpenX Mobile Android SDK provides the following types of parameters:

UserParameters

You can use UserParameters to pass ad call request parameters.

You can manually set custom parameters using setUserParameters() on AdView and send it through the corresponding load().


// Set user parameters to enrich ad request data.
// Please see UserParameters for the userKeys and the APIs available.
UserParameters userParameters = new UserParameters();
userParameters.setCustomParameter("keywords", "socialNetworking");
userParameters.setParameter(UserParameters.KEY_AGE, "18");
userParameters.setParameter(UserParameters.KEY_INCOME, "50000");
 
// Set parameters.
// userParameters.setCustomParameters(Hashtable<String, String> params)
// userParameters.setParameters(Hashtable<String, String> params)
// clear parameters
// userParameters.clearParameters()
// userParameters.clearParameter(String key)
 
adView.setUserParameters(userParameters);
			

OXSettings

Field Description

Default

defaultDomain

If set, controls the initial value of domain for all newly created AdViews. Useful if the same domain is in use throughout your app.

Null

defaultAdUnitId

If set, controls the initial value of adUnitID for all newly created AdViews. Useful if the same domain is in use throughout your app.

Null

defaultAutoRefreshDelay

Controls the initial value of autoRefreshDelay for all newly created OXMAdViews in seconds.

60

logLevel

Controls the type of messages of the internal logger. Options are:

  • DEBUG - this is the noisiest level.
  • ERROR
  • WARN
  • NONE

NONE

sendMRAIDSupportParams

If true, the SDK sends "af=3,5", indicating support for MRAIDMobile Rich Ad Interface Definitions, a type of API framework for interfacing between an ad creative and native mobile capabilities..

true

secureRequestsEnabled

If true, the SDK will use HTTPS instead of HTTP.

false