Stay organized with collections
Save and categorize content based on your preferences.
GoogleMobileAds.Ump.Api.ConsentDebugSettings
Debug settings for testing User Messaging Platform.
Summary
Public attributes
DebugGeography
DebugGeography DebugGeography = DebugGeography.Disabled
The debug geography for testing purposes.
TestDeviceHashedIds
List< string > TestDeviceHashedIds = new List()
Registers a device as a test device. Test devices respect debug geography settings to enable easier testing. Test devices must be added individually so that debug geography settings won't accidentally get released to all users.
You can access the hashedDeviceId from the console logs once your app calls ConsentInformation.
Details |
Template Parameters |
string
|
hashedId The hashed device ID that should be considered a debug device.
|
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eConsentDebugSettings\u003c/code\u003e allows developers to test the User Messaging Platform (UMP) with simulated geography and designated test devices.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDebugGeography\u003c/code\u003e attribute helps simulate a specific geographic region for testing consent flows.\u003c/p\u003e\n"],["\u003cp\u003eTest devices can be registered using their hashed IDs via \u003ccode\u003eTestDeviceHashedIds\u003c/code\u003e to ensure debug settings are not applied to all users.\u003c/p\u003e\n"],["\u003cp\u003eHashed device IDs for testing can be obtained from the console logs after calling \u003ccode\u003eConsentInformation\u003c/code\u003e.\u003c/p\u003e\n"]]],["`ConsentDebugSettings` facilitates testing the User Messaging Platform. It offers two key attributes: `DebugGeography` and `TestDeviceHashedIds`. `DebugGeography` sets the geographic region for debugging, defaulting to disabled. `TestDeviceHashedIds` registers specific devices for testing, respecting debug geography. Devices are added individually to prevent unintentional widespread debug settings. You can get the hashedDeviceId from console logs when your app calls `ConsentInformation`.\n"],null,["# GoogleMobileAds.Ump.Api.ConsentDebugSettings Class Reference\n\nGoogleMobileAds.Ump.Api.ConsentDebugSettings\n============================================\n\nDebug settings for testing User Messaging Platform.\n\nSummary\n-------\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DebugGeography](#class_google_mobile_ads_1_1_ump_1_1_api_1_1_consent_debug_settings_1a7703b4d549fae6997b10897f752b3a6d)` = DebugGeography.Disabled` | [DebugGeography](/ad-manager/mobile-ads-sdk/unity/reference/namespace/google-mobile-ads/ump/api#namespace_google_mobile_ads_1_1_ump_1_1_api_1a27be0886258b34265df84626c4b24a3e) The debug geography for testing purposes. |\n| [TestDeviceHashedIds](#class_google_mobile_ads_1_1_ump_1_1_api_1_1_consent_debug_settings_1a1cad69056518180b1e72e994ec18b57e)` = new List`() | `List\u003c string \u003e` |\n\nPublic attributes\n-----------------\n\n### DebugGeography\n\n```c#\nDebugGeography DebugGeography = DebugGeography.Disabled\n``` \nThe debug geography for testing purposes. \n\n### TestDeviceHashedIds\n\n```c#\nList\u003c string \u003e TestDeviceHashedIds = new List()\n``` \nRegisters a device as a test device. Test devices respect debug geography settings to enable easier testing. Test devices must be added individually so that debug geography settings won't accidentally get released to all users.\n\nYou can access the hashedDeviceId from the console logs once your app calls [ConsentInformation](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/ump/api/consent-information#class_google_mobile_ads_1_1_ump_1_1_api_1_1_consent_information).\n\n\u003cbr /\u003e\n\n| Details ||\n|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Template Parameters | |----------|-------------------------------------------------------------------------| | `string` | hashedId The hashed device ID that should be considered a debug device. | |"]]