RequestConfiguration

public class RequestConfiguration extends Object

Global configuration that will be used for every AdRequest.

Nested Class Summary

class RequestConfiguration.Builder Builder for RequestConfiguration
@interface RequestConfiguration.MaxAdContentRating Allowed constants for RequestConfiguration.Builder.setMaxAdContentRating(String)
enum RequestConfiguration.PublisherPrivacyPersonalizationState Publisher privacy treatment personalization states. 
@interface RequestConfiguration.TagForChildDirectedTreatment Allowed constants for RequestConfiguration.Builder.setTagForChildDirectedTreatment(int)
@interface RequestConfiguration.TagForUnderAgeOfConsent Allowed constants for RequestConfiguration.Builder.setTagForUnderAgeOfConsent(int)

Constant Summary

String MAX_AD_CONTENT_RATING_G Content suitable for general audiences, including families.
String MAX_AD_CONTENT_RATING_MA Content suitable only for mature audiences.
String MAX_AD_CONTENT_RATING_PG Content suitable for most audiences with parental guidance.
String MAX_AD_CONTENT_RATING_T Content suitable for teen and older audiences.
String MAX_AD_CONTENT_RATING_UNSPECIFIED No specified content rating.
int TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE Indicates that ad requests should not be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).
int TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE Indicates that ad requests should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).
int TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED Provides no indication whether ad requests should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).
int TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE Indicates the publisher specified that the ad request should not receive treatment for users in the European Economic Area (EEA) under the age of consent.
int TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE Indicates the publisher specified that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.
int TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED Indicates that the publisher has not specified whether the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.

Public Method Summary

String
RequestConfiguration.PublisherPrivacyPersonalizationState
getPublisherPrivacyPersonalizationState()
Returns the publisher privacy treatment personalization state.
int
int
List<String>
getTestDeviceIds()
Returns the test device IDs corresponding to test device which will always request test ads.
RequestConfiguration.Builder

Inherited Method Summary

Constants

public static final String MAX_AD_CONTENT_RATING_G

Content suitable for general audiences, including families.

Constant Value: "G"

public static final String MAX_AD_CONTENT_RATING_MA

Content suitable only for mature audiences.

Constant Value: "MA"

public static final String MAX_AD_CONTENT_RATING_PG

Content suitable for most audiences with parental guidance.

Constant Value: "PG"

public static final String MAX_AD_CONTENT_RATING_T

Content suitable for teen and older audiences.

Constant Value: "T"

public static final String MAX_AD_CONTENT_RATING_UNSPECIFIED

No specified content rating.

Constant Value: ""

public static final int TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE

Indicates that ad requests should not be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

Constant Value: 0

public static final int TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE

Indicates that ad requests should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

Constant Value: 1

public static final int TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED

Provides no indication whether ad requests should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).

Constant Value: -1

Indicates the publisher specified that the ad request should not receive treatment for users in the European Economic Area (EEA) under the age of consent.

Constant Value: 0

Indicates the publisher specified that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.

Constant Value: 1

Indicates that the publisher has not specified whether the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.

Constant Value: -1

Public Methods

public String getMaxAdContentRating ()

Returns the value set by the corresponding RequestConfiguration.Builder.setMaxAdContentRating(String).

public RequestConfiguration.PublisherPrivacyPersonalizationState getPublisherPrivacyPersonalizationState ()

Returns the publisher privacy treatment personalization state.

public int getTagForChildDirectedTreatment ()

Returns the value set by the corresponding RequestConfiguration.Builder.setTagForChildDirectedTreatment(int).

public int getTagForUnderAgeOfConsent ()

Returns the value set by the corresponding RequestConfiguration.Builder.setTagForUnderAgeOfConsent(int).

public List<String> getTestDeviceIds ()

Returns the test device IDs corresponding to test device which will always request test ads. Returns an empty list if test device IDs were not previously set.

public RequestConfiguration.Builder toBuilder ()

Returns a RequestConfiguration.Builder with values from this RequestConfiguration.