RequestConfiguration

public class RequestConfiguration


每個 AdRequest 都會使用的全域設定。

摘要

巢狀類型

RequestConfiguration 的建構工具。

@Retention(value = SOURCE)
@StringDef(value = )
public annotation RequestConfiguration.MaxAdContentRating

setMaxAdContentRating 允許的常數。

發布商隱私權處理方式個人化狀態。

@Retention(value = SOURCE)
@IntDef(value = )
public annotation RequestConfiguration.TagForChildDirectedTreatment

setTagForChildDirectedTreatment 允許的常數。

@Retention(value = SOURCE)
@IntDef(value = )
public annotation RequestConfiguration.TagForUnderAgeOfConsent

setTagForUnderAgeOfConsent 允許的常數。

常數

static final String

內容適合一般大眾,包括闔家觀眾。

static final String

內容只適合成人觀眾。

static final String

內容適合大多數觀眾 (需有家長監護)。

static final String

內容適合青少年和成人觀眾。

static final String

未指定內容分級。

static final int

表示廣告請求不應視為兒童導向內容,以符合《兒童網路隱私保護法》(COPPA) 規定。

static final int

表示廣告請求應視為兒童導向內容,以符合《兒童網路隱私保護法》(COPPA) 的規定。

static final int

未提供任何資訊,說明廣告請求是否應視為《兒童網路隱私保護法》(COPPA) 所稱的兒童導向內容。

static final int

表示發布商已指定廣告請求不應針對歐洲經濟區 (EEA) 境內未滿法定同意年齡的使用者採取相關處理模式。

static final int

表示發布商已指定廣告請求應針對歐洲經濟區 (EEA) 境內未滿法定同意年齡的使用者採取相關處理模式。

static final int

表示發布商未指定廣告請求是否應針對歐洲經濟區 (EEA) 境內未滿法定同意年齡的使用者採用受限的資料處理模式。

公用方法

String

傳回對應 setMaxAdContentRating 所設定的值。

RequestConfiguration.PublisherPrivacyPersonalizationState

傳回發布商隱私權處理方式個人化狀態。

int

傳回對應 setTagForChildDirectedTreatment 所設定的值。

int

傳回對應 setTagForUnderAgeOfConsent 所設定的值。

List<String>

傳回與測試裝置相對應的測試裝置 ID,該裝置一律會要求測試廣告。

RequestConfiguration.Builder

傳回含有此 RequestConfiguration 值的 Builder

常數

MAX_AD_CONTENT_RATING_G

public static final String MAX_AD_CONTENT_RATING_G = "G"

內容適合一般大眾,包括闔家觀眾。

MAX_AD_CONTENT_RATING_MA

public static final String MAX_AD_CONTENT_RATING_MA = "MA"

內容只適合成人觀眾。

MAX_AD_CONTENT_RATING_PG

public static final String MAX_AD_CONTENT_RATING_PG = "PG"

內容適合大多數觀眾 (需有家長監護)。

MAX_AD_CONTENT_RATING_T

public static final String MAX_AD_CONTENT_RATING_T = "T"

內容適合青少年和成人觀眾。

MAX_AD_CONTENT_RATING_UNSPECIFIED

public static final String MAX_AD_CONTENT_RATING_UNSPECIFIED = ""

未指定內容分級。

TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE

public static final int TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE = 0

表示廣告請求不應視為兒童導向內容,以符合《兒童網路隱私保護法》(COPPA) 規定。

TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE

public static final int TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE = 1

表示廣告請求應視為兒童導向內容,以符合《兒童網路隱私保護法》(COPPA) 的規定。

TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED

public static final int TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED = -1

未提供任何資訊,說明廣告請求是否應視為《兒童網路隱私保護法》(COPPA) 所稱的兒童導向內容。

public static final int TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE = 0

表示發布商已指定廣告請求不應針對歐洲經濟區 (EEA) 境內未滿法定同意年齡的使用者採取相關處理模式。

public static final int TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE = 1

表示發布商已指定廣告請求應針對歐洲經濟區 (EEA) 境內未滿法定同意年齡的使用者採取相關處理模式。

public static final int TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED = -1

表示發布商未指定廣告請求是否應針對歐洲經濟區 (EEA) 境內未滿法定同意年齡的使用者採用受限的資料處理模式。

公開欄位

maxAdContentRating

public final @Nullable String maxAdContentRating

tagForChildDirectedTreatment

public final int tagForChildDirectedTreatment

tagForUnderAgeOfConsent

public final int tagForUnderAgeOfConsent

testDeviceIds

public final List<StringtestDeviceIds

公用方法

getMaxAdContentRating

@RequestConfiguration.MaxAdContentRating
public String getMaxAdContentRating()

傳回對應 setMaxAdContentRating 所設定的值。

getPublisherPrivacyPersonalizationState

public RequestConfiguration.PublisherPrivacyPersonalizationState getPublisherPrivacyPersonalizationState()

傳回發布商隱私權處理方式個人化狀態。

getTagForChildDirectedTreatment

@RequestConfiguration.TagForChildDirectedTreatment
public int getTagForChildDirectedTreatment()

傳回對應 setTagForChildDirectedTreatment 所設定的值。

getTagForUnderAgeOfConsent

@RequestConfiguration.TagForUnderAgeOfConsent
public int getTagForUnderAgeOfConsent()

傳回對應 setTagForUnderAgeOfConsent 所設定的值。

getTestDeviceIds

public List<StringgetTestDeviceIds()

傳回與測試裝置相對應的測試裝置 ID,該裝置一律會要求測試廣告。如果先前未設定測試裝置 ID,則會傳回空白清單。

toBuilder

public RequestConfiguration.Builder toBuilder()

傳回含有此 RequestConfiguration 值的 Builder