ConsentDebugSettings.Builder

public class ConsentDebugSettings.Builder


ConsentDebugSettings 的建構工具。

摘要

公用建構函式

Builder(Context context)

公用方法

ConsentDebugSettings.Builder

將裝置註冊為測試裝置。

ConsentDebugSettings

可建構 ConsentDebugSettings

ConsentDebugSettings.Builder

設定偵錯地理區域,以利測試。

公用建構函式

Builder

public Builder(Context context)

公用方法

addTestDeviceHashedId

@CanIgnoreReturnValue
public ConsentDebugSettings.Builder addTestDeviceHashedId(String hashedId)

將裝置註冊為測試裝置。測試裝置會遵循偵錯地理位置設定,方便進行測試。您必須個別新增測試裝置,以免誤將偵錯地理設定發布給所有使用者。

應用程式呼叫 requestConsentInfoUpdate 後,您就可以從 Logcat 存取 hashedDeviceId

參數
String hashedId

應視為偵錯裝置的雜湊裝置 ID。

build

public ConsentDebugSettings build()

可建構 ConsentDebugSettings

setDebugGeography

@CanIgnoreReturnValue
public ConsentDebugSettings.Builder setDebugGeography(
    @ConsentDebugSettings.DebugGeography int debugGeography
)

設定偵錯地理位置以供測試。

預設值為 DEBUG_GEOGRAPHY_DISABLED