Admob UMP consent testing

607 views
Skip to first unread message

Eric

unread,
Dec 22, 2023, 3:42:40 AM12/22/23
to Google Mobile Ads SDK Developers
Hi, can someone confirm for me if the test device ID is referring to the Advertising ID/IDFA or the phone device ID in the code below? I am currently testing the UMP consent, thus any help will be greatly appreciated.

void Start()
{
    
var debugSettings = new ConsentDebugSettings
    
{
        
TestDeviceHashedIds =
        
new List<string>
        
{
            
"TEST-DEVICE-HASHED-ID"
        
}

    
};

    
// Set tag for under age of consent.
    
// Here false means users are not under age of consent.
    
ConsentRequestParameters request = new ConsentRequestParameters
    
{
        
TagForUnderAgeOfConsent = false,
        
ConsentDebugSettings = debugSettings,
    
};

    
// Check the current consent information status.
    
ConsentInformation.Update(request, OnConsentInfoUpdated);
}

Mobile Ads SDK Forum Advisor

unread,
Dec 22, 2023, 5:17:10 AM12/22/23
to svey...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for contacting the Mobile Ads SDK Support team. 

By reviewing your concern, I understand that you are facing an issue related to ‘TEST-DEVICE-HASHED-ID’ in Android App.

If you want to test the integration in your app as you're developing, follow the steps below to programmatically register your test device.

  • Call requestConsentInfoUpdate().
  • Check the log output for a message that looks like the one below, which shows you your device ID and how to add it as a test device:
         Use new ConsentDebugSettings.Builder().addTestDeviceHashedId("33BE2250B43518CCDA7DE426D04EE231") to set this as a debug device.
  • Copy your test device ID to your clipboard.
  • Modify your code to call ConsentDebugSettings.Builder().addTestDeviceHashedId() and pass in a list of your test device IDs.

ConsentDebugSettings debugSettings = new ConsentDebugSettings.Builder(this)

    .addTestDeviceHashedId("TEST-DEVICE-HASHED-ID")

    .build();

ConsentRequestParameters params = new ConsentRequestParameters

    .Builder()

    .setConsentDebugSettings(debugSettings)

    .build();

consentInformation = UserMessagingPlatform.getConsentInformation(this);

// Include the ConsentRequestParameters in your consent request.

consentInformation.requestConsentInfoUpdate(

    this,

    params,

    ...

);

Kindly refer this for more info related to 'TEST-DEVICE-HASHED-ID'. 

This message is in relation to case "ref:!00D1U01174p.!5004Q02r3GbV:ref"

Thanks,
 
Google Logo Mobile Ads SDK Team


Reply all
Reply to author
Forward
0 new messages