Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Setting .DEBUG_GEOGRAPHY_EEA causes requestConsentInfoUpdate to fail #101

Open
Muted55 opened this issue Oct 31, 2019 · 1 comment
Open

Comments

@Muted55
Copy link

Muted55 commented Oct 31, 2019

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. ");
        }
    });
@rareserban
Copy link

Setting test device as well might help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants