googleads-consent-sdk-android icon indicating copy to clipboard operation
googleads-consent-sdk-android copied to clipboard

Setting .DEBUG_GEOGRAPHY_EEA causes requestConsentInfoUpdate to fail

Open Muted55 opened this issue 4 years ago • 1 comments

Hello,

Can someone please assist me with an issue I am having when using the .DEBUG_GEOGRAPHY_EEA

When I set the DebugGeography.DEBUG_GEOGRAPHY_NOT_EEA the requestConsentInfoUpdate returns successfully however if I then set it to .DEBUG_GEOGRAPHY_EEA the ConsentInfoUpdate fails.

This occurs on the real device below and on a simulated device. Using Android Studio : compileSdkVersion 29 implementation 'com.google.android.ads.consent:consent-library:1.0.6' Device : Samsung Galaxy J4 (android version 8.0.0) The DEVICE_ID and pub-MY-ID would be replaced when running the app. The code I am using is below:

ConsentInformation.getInstance(this).addTestDevice("DEVICE-ID");

    // Geography appears as in EEA for test devices.
    ConsentInformation.getInstance(this).setDebugGeography(DebugGeography.DEBUG_GEOGRAPHY_EEA);

    // Geography appears as not in EEA for debug devices.
    //ConsentInformation.getInstance(this).setDebugGeography(DebugGeography.DEBUG_GEOGRAPHY_NOT_EEA);

    ConsentInformation consentInformation = ConsentInformation.getInstance(this);
    String[] publisherIds = {"pub-MY-ID"};

    consentInformation.requestConsentInfoUpdate(publisherIds, new ConsentInfoUpdateListener() {
        @Override
        public void onConsentInfoUpdated(ConsentStatus consentStatus) {
            Log.d("consent"," User's consent status successfully updated. ");
            
        }

        @Override
        public void onFailedToUpdateConsentInfo(String errorDescription) {
            // User's consent status failed to update.
            Log.d("consent"," User's consent status failed to update. ");
        }
    });

Muted55 avatar Oct 31 '19 22:10 Muted55

Setting test device as well might help.

rareserban avatar Nov 03 '19 05:11 rareserban