ConsentDebugSettings.Builder

class ConsentDebugSettings.Builder


ConsentDebugSettings 的建構工具。

摘要

公用建構函式

Builder(context: Context!)

公開函式

ConsentDebugSettings.Builder!

將裝置註冊為測試裝置。

ConsentDebugSettings!

可建構 ConsentDebugSettings

ConsentDebugSettings.Builder!

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

公用建構函式

Builder

Builder(context: Context!)

公開函式

addTestDeviceHashedId

@CanIgnoreReturnValue
fun addTestDeviceHashedId(hashedId: String!): ConsentDebugSettings.Builder!

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

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

參數
hashedId: String!

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

build

fun build(): ConsentDebugSettings!

可建構 ConsentDebugSettings

setDebugGeography

@CanIgnoreReturnValue
fun setDebugGeography(
    @ConsentDebugSettings.DebugGeography debugGeography: Int
): ConsentDebugSettings.Builder!

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

預設值為 DEBUG_GEOGRAPHY_DISABLED