RequestConfiguration

public class RequestConfiguration


用於每個 AdRequest 的全域設定。

摘要

巢狀型別

RequestConfiguration 的建構工具。

setMaxAdContentRating 允許的常數。

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

setTagForChildDirectedTreatment 允許的常數。

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

指出發布商是否指定要對歐洲經濟區境內未滿規定年齡的使用者,套用適當模式。

static final int

表示發布商未指定是否要對歐洲經濟區境內未滿規定年齡的使用者,套用適當模式。

常數

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

指出發布商是否指定要對歐洲經濟區境內未滿規定年齡的使用者,套用適當模式。

public static final int TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED = -1

表示發布商未指定是否要對歐洲經濟區境內未滿規定年齡的使用者,套用適當模式。

公開欄位

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