MediationAdRequest

public interface MediationAdRequest

Known direct subclasses
NativeMediationAdRequest

This interface is deprecated.

Use Adapter and MediationNativeAdConfiguration instead.


Information about the ad to fetch for a single publisher. The information is passed through to the ad network's adapter.

Summary

Constants

default static final int

As returned by taggedForChildDirectedTreatment, indicates that the app should not be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

default static final int

As returned by taggedForChildDirectedTreatment, indicates that the app should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

default static final int

As returned by taggedForChildDirectedTreatment, indicates that the publisher has not specified whether the app should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

Public methods

abstract Date

This method is deprecated.

abstract int

This method is deprecated.

abstract Set<String>

Returns the set of keywords requested by the user, if defined by the .

abstract Location

Returns the location of the user, if defined by the .

abstract boolean

This method is deprecated.

abstract boolean

Returns true if the publisher is asking for test ads.

abstract int

Returns whether the publisher indicated that the app is to be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) - http://business.ftc.gov/privacy-and-security/childrens-privacy.

Constants

TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE

default static final int TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE = 0

As returned by taggedForChildDirectedTreatment, indicates that the app should not be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE

default static final int TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE = 1

As returned by taggedForChildDirectedTreatment, indicates that the app should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED

default static final int TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED = -1

As returned by taggedForChildDirectedTreatment, indicates that the publisher has not specified whether the app should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

Public methods

getBirthday

abstract Date getBirthday()

Returns the birthday of the user, if defined by the .

getGender

abstract int getGender()

Returns the gender of the user, if defined by the com.google.android.gms.ads.AdRequest.

getKeywords

abstract Set<StringgetKeywords()

Returns the set of keywords requested by the user, if defined by the .

getLocation

abstract Location getLocation()

Returns the location of the user, if defined by the .

isDesignedForFamilies

abstract boolean isDesignedForFamilies()

Publishers that have opted into the Designed for Families program may specify that an ad request should return a Designed for Families-compliant ad. Please see the Google AdMob help center article for more information about this setting.

Returns true if the publisher indicated that the ad request is required to return a Designed for Families-compliant ad.

Returns false if the publisher did not indicate that the ad request is required to return a Designed for Families-compliant ad.

Note: This setting is separate from the Children's Online Privacy Protection Act (COPPA) "tag for child directed treatment" setting. For COPPA-related compliance, see taggedForChildDirectedTreatment.

isTesting

abstract boolean isTesting()

Returns true if the publisher is asking for test ads. Publishers request test ads by specifying a device ID, but this information is resolved to a boolean for convenience.

taggedForChildDirectedTreatment

abstract int taggedForChildDirectedTreatment()

Returns whether the publisher indicated that the app is to be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) - http://business.ftc.gov/privacy-and-security/childrens-privacy.

If this method returns TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE, it indicates that the app should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

If this method returns TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE, it indicates that the app should not be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

If this method returns TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED, it indicates that the publisher has not specified whether the app should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).