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