capacitor-community / admob

Community plugin for using Google AdMob
MIT License
205 stars 66 forks source link

Issue with tagForChildDirectedTreatment and AAID transmission #300

Open rafaeldcastro opened 7 months ago

rafaeldcastro commented 7 months ago

Hello everyone, I actually don't have a bug, it's more of a situation than a problem.

I recently received a message from Google about my app and the need to use the "tagForChildDirectedTreatment": true attribute as my app is "family friendly".

I made the changes they "needed", but apparently it wasn't enough. I received a new notification giving me a deadline of December 22.

Look what they sent me:

Hi Developer at *****,

Thanks for contacting the Google Play team.

Issue: Google Play Policy Violation

We’ve reviewed your appeal request and found that your app, ***** (com.my.appID) is currently in violation of Google Play policy. Please resolve this issue by December 22, 2023 or your app will be removed from Google Play.

During review, we found that your app violates the Families Policy Requirements. We’ve identified that your app or an SDK in your app transmits identifier(s) that do not comply with our Families Policy. These identifiers may include, but are not limited to, Advertising ID.

For example, the destinations of Android Advertising ID transmission may include, but are not limited to, fundingchoicesmessages.google.com.

Apps that solely target children, must not transmit the following:

Android Advertising ID (AAID) SIM Serial Build Serial BSSID MAC SSID IMEI and/or IMSI Apps that target both children and older audiences must not transmit the listed identifiers from children or users of unknown age.

Please note that you may also want to double check that your app complies with all other Developer Program Policies as additional enforcement could occur if there are further policy violations.

Before resubmitting your app for further review, please make sure to deactivate the non-compliant version (App Bundle Version: 28, Track: Production and App Bundle Version: 27, Track: Production) and increment the version code of APK. All active APKs (including Alpha, Beta, production, and internal testing) of your app must be compliant with our policy.

Action required: Submit your app for another review by December 22, 2023

Read through the "Data Practices" section (#5) of the Families Policy Requirements, and the User Data policy. Make appropriate changes to your app, and be sure to address the issue described above. The help center article Data Practices in Families apps may be helpful. Review your Declared Target Audience for accuracy. Double check that your app is compliant with all other Developer Program Policies. Sign in to Play Console, upload the modified policy-compliant APK across all tracks, and deactivate the non-compliant APK(s). To deactivate a non-compliant APK, please create a new release and upload a compliant APK to the same track. Be sure to increment the APK version number and set the release to 100% roll-out in order to successfully override and deactivate the non-compliant APK.

My application is already on the latest supported SDK, and I recently had to add GDPR-related conditionals even though I don't have a European audience. Any suggestions on what to do or how to proceed.

I already tried to "remove" my application from the "family friendly" session, but now it's impossible (I don't know why).

I put some code together and this is how I initialize admob on my app:


private async initAdmob() {
        try {
            await this._admobService.initialize();
        } catch (error) {
            console.error('Error 112: ', error);
        }

        try {
        } catch (error) {
            console.error('Error 117: ', error);
        }

        try {
            const [authorizationStatus, trackingInfo, consentInfo] =
                await Promise.all([
                    this._admobService.trackingAuthorizationStatus(),
                    this._admobService.trackingAuthorizationStatus(),
                    this._admobService.requestConsentInfo(),
                ]);

            if (trackingInfo.status === 'notDetermined') {
                await this._admobService.requestTrackingAuthorization();
            }

            if (
                authorizationStatus.status === 'authorized' &&
                consentInfo.isConsentFormAvailable &&
                consentInfo.status ===
                    this._admobService.AdmobConsentStatus.REQUIRED
            ) {
                await this._admobService.showConsentForm();
            }
        } catch (error) {
            console.error('Error 141: ', error);
        }

        try {
            await this._admobService.presentBanner();
        } catch (error) {
            console.error('Error 147: ', error);
        }
    }

initialize(): Promise<void> {
        return AdMob.initialize({
            tagForChildDirectedTreatment: true,
        });
    }

showConsentForm(): Promise<AdmobConsentInfo> {
        return AdMob.showConsentForm();
    }

trackingAuthorizationStatus(): Promise<TrackingAuthorizationStatusInterface> {
        return AdMob.trackingAuthorizationStatus();
    }

requestConsentInfo(): Promise<AdmobConsentInfo> {
        return AdMob.requestConsentInfo();
    }

requestTrackingAuthorization(): Promise<TrackingAuthorizationStatusInterface> {
        return AdMob.trackingAuthorizationStatus();
    }

presentBanner(options?: BannerAdOptions): Promise<void> {
        const opt = options ? options : this._bannerOptions;

        this.addListener(BannerAdPluginEvents.Loaded, () => {
            this.bannerLoaded$.next('Banner Loaded');
        });

        this.addListener(
            BannerAdPluginEvents.SizeChanged,
            (size: AdMobBannerSize) => {
                this.bannerSizeChanged$.next(size);
                this._bannerAppMargin = parseInt(`${size.height}`, 10);

                if (this._bannerAppMargin > 0) {
                    this.setBannerMargin('ion-router-outlet');
                }
            }
        );
        this.isPrepareBanner = true;
        return this.showBanner(opt);
    }
yakovyarmo commented 3 months ago

same thing happened for me