react-native-google-mobile-ads icon indicating copy to clipboard operation
react-native-google-mobile-ads copied to clipboard

For European User Consent, user approval is requested again after user approval is obtained.

Open bloggerklik opened this issue 3 years ago • 4 comments

Issue

I am working on European User Consent. I get the user confirmation and when I close and open the application, the confirmation popup appears again. consentInfo.status always returns REQUIRED. Am I doing something wrong?

`React.useEffect(() => { asyncUserConsent(); }, []);

async function asyncUserConsent() {

    try {
        const consentInfo = await AdsConsent.requestInfoUpdate({
            debugGeography: AdsConsentDebugGeography.EEA,
            testDeviceIdentifiers: ['TEST-DEVICE-HASHED-ID'],
        });

        console.log("STATUS " + consentInfo.status);

        if (consentInfo.isConsentFormAvailable && consentInfo.status === AdsConsentStatus.REQUIRED) {
            const { status } = await AdsConsent.showForm();
        }

    } catch (error) { console.log(error); }

}`

Project Files

Javascript

Click To Expand

package.json:

# N/A

admob.json:

# N/A

iOS

Click To Expand

ios/Podfile:

# N/A

Android

Click To Expand

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

AndroidManifest.xml:

<!-- N/A -->

Environment

Click To Expand

react-native info output:

 OUTPUT GOES HERE
  • Platform that you're experiencing the issue on:
    • [ ] iOS
    • [ ] Android
    • [ ] iOS but have not tested behavior on Android
    • [ x] Android but have not tested behavior on iOS
    • [ ] Both
  • Are you using TypeScript?
    • Y/N & VERSION N

  • 👉 Check out Invertase on Twitter for updates on the library.

bloggerklik avatar Jun 03 '22 21:06 bloggerklik

Same here, consentInfo.status always returns REQUIRED on both iOS and Android. Tried it several times by restarting the app after consenting but it still returns REQUIRED every time.

RoccoDocco avatar Jun 12 '22 12:06 RoccoDocco

Sorry for the lack of response on this one, I suppose all the maintainers (and there are 5 of us at the moment!) are swamped for some reason. I know I have been and have not been able to verify this. @birgernass was the original implementer, I would be surprised if they had not gotten it to work in their implementation / testing, perhaps they have an idea?

mikehardy avatar Jun 12 '22 13:06 mikehardy

My best guess is that it's related to Expo, as I haven't tested with it yet. The TC String is stored in the device's shared preferences. You could inspect those and see if the value changes accordingly.

Sadly I am currently hospitalized and won't be able to look into any issues for a few weeks, I'm sorry about that.

birgernass avatar Jun 12 '22 17:06 birgernass

Oh my goodness - I'm so sorry to hear that @birgernass - forget software, take care of your hardware. Best wishes for good health

@RoccoDocco / @bloggerklik in case you are not familiar, easiest way to inspect shared prefs of an android app is likely to plug the device in and connect to it via android simulator, you may browse the device filesystem that way in order to find the prefs file and open it up for a look

mikehardy avatar Jun 13 '22 13:06 mikehardy

+1

Hknzbyn avatar Nov 17 '22 21:11 Hknzbyn

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

github-actions[bot] avatar Dec 15 '22 21:12 github-actions[bot]