public class MediationAdRequest extends Object
Constructor and Description |
---|
MediationAdRequest(AdRequest request,
Context context,
boolean shareLocation)
Creates a new MediationAdRequest from an existing AdRequest
|
Modifier and Type | Method and Description |
---|---|
Integer |
getAgeInYears()
Calculates the age of the user in years, if the birthday is defined by the
AdRequest.
|
Date |
getBirthday()
Gets the birthday of the user, if defined by the AdRequest
|
AdRequest.Gender |
getGender()
Gets the gender of the user, if defined by the AdRequest
|
Set<String> |
getKeywords()
Gets a set of keywords requested by the user, if defined by the AdRequest
|
Location |
getLocation()
Gets the physical location of the user, if defined by the AdRequest and allowed to be shared
by the publisher.
|
boolean |
isTesting()
Gets a flag determining whether the publisher is asking for test ads.
|
public MediationAdRequest(AdRequest request, Context context, boolean shareLocation)
request
- Ad request parameters (null not allowed)context
- Android Context the ad is running under. If this is null,
then isTesting()
will always return true.shareLocation
- Whether to share location from 'request' with ad networks.
If true, getLocation()
returns the location from 'request',
if false, getLocation()
returns null.public AdRequest.Gender getGender()
public Date getBirthday()
public Integer getAgeInYears()
getBirthday()
.public Set<String> getKeywords()
public Location getLocation()
public boolean isTesting()