RequestConfiguration

class RequestConfiguration


Global configuration that will be used for every ad request.

Summary

Nested types

@Retention(value = AnnotationRetention.SOURCE)
@StringDef(value = ["", "G", "PG", "T", "MA"])
annotation RequestConfiguration.MaxAdContentRating

Allowed constants for MaxAdContentRating.

@Retention(value = AnnotationRetention.SOURCE)
@IntDef(value = [-1, 0, 1])
annotation RequestConfiguration.TagForChildDirectedTreatment

Allowed constants for TagForChildDirectedTreatment.

@Retention(value = AnnotationRetention.SOURCE)
@IntDef(value = [-1, 0, 1])
annotation RequestConfiguration.TagForUnderAgeOfConsent

Allowed constants for TagForUnderAgeOfConsent.

Constants

const String

Content suitable for general audiences, including families.

const String

Content suitable only for mature audiences.

const String

Content suitable for most audiences with parental guidance.

const String

Content suitable for teen and older audiences.

const String

No specified content rating.

const Int

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

const Int

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

const Int

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

const Int

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.

const Int

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

const Int

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 constructors

RequestConfiguration(
    @RequestConfiguration.TagForChildDirectedTreatment tagForChildDirectedTreatment: Int,
    @RequestConfiguration.TagForUnderAgeOfConsent tagForUnderAgeOfConsent: Int,
    @RequestConfiguration.MaxAdContentRating maxAdContentRating: String,
    testDeviceIds: List<String>
)

Constants

MAX_AD_CONTENT_RATING_G

const val MAX_AD_CONTENT_RATING_GString

Content suitable for general audiences, including families.

MAX_AD_CONTENT_RATING_MA

const val MAX_AD_CONTENT_RATING_MAString

Content suitable only for mature audiences.

MAX_AD_CONTENT_RATING_PG

const val MAX_AD_CONTENT_RATING_PGString

Content suitable for most audiences with parental guidance.

MAX_AD_CONTENT_RATING_T

const val MAX_AD_CONTENT_RATING_TString

Content suitable for teen and older audiences.

MAX_AD_CONTENT_RATING_UNSPECIFIED

const val MAX_AD_CONTENT_RATING_UNSPECIFIEDString

No specified content rating.

TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE

const val TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE = 0: Int

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

TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE

const val TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE = 1: Int

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

TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED

const val TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIEDInt

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

const val TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE = 0: Int

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.

const val TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE = 1: Int

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

const val TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIEDInt

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 constructors

RequestConfiguration

RequestConfiguration(
    @RequestConfiguration.TagForChildDirectedTreatment tagForChildDirectedTreatment: Int,
    @RequestConfiguration.TagForUnderAgeOfConsent tagForUnderAgeOfConsent: Int,
    @RequestConfiguration.MaxAdContentRating maxAdContentRating: String,
    testDeviceIds: List<String>
)

Public properties

maxAdContentRating

val maxAdContentRatingString

tagForChildDirectedTreatment

val tagForChildDirectedTreatmentInt

tagForUnderAgeOfConsent

val tagForUnderAgeOfConsentInt

testDeviceIds

val testDeviceIdsList<String>