I'm way past Google's deadline (I was busy past few months) to resolve this issue but that's irrelevant for this question.
"Action Required: Your app is not compliant with Google Play Policies"
"Issue found: Families Data Practices"
"Issue: Google Play Policy Violation" (quote from an email from Google)
Here's a screenshot with part of a message I have received from Google:

In the case of my app, I DO show ads.
My app also targets both children and older audiences.
I try to show personalized ads as much as legally possible (they yield higher profit), and for that reason I have implemented a neutral age screen that gets shown to the user before creating an account (to find out if the user is above 13 years old or not).
I have created this method getNonPersonalizedAds(...), which checks if my app can show personalized ads to the user or not. isUserChild (meaning is user under/over 13) is a value from a firestore document associated with the current user's account.
As of now, I have not yet implemented the saving of that value in firestore, so the first sub-condition of this method will always return true, which means that at the moment, PERSONALIZED ADS ARE NEVER SHOWN, regardless of age or other parameters.
bool getNonPersonalizedAds(BuildContext context) {
//if any of the following conditions are true, return true (to show NON-personalized ads)
return Provider.of<UserStatsModel>(context, listen: false).isUserChild == null || //<-unknown age
//! is for null safety, not negation:
Provider.of<UserStatsModel>(context, listen: false).isUserChild! ||
(Platform.isIOS && Provider.of<TrackingStatus>(context, listen: false) != TrackingStatus.authorized) ||
//GDPR:
Provider.of<ConsentStatus>(context, listen: false) != ConsentStatus.obtained;
}
I made sure that getNonPersonalizedAds(...) gets called in every single location in my code, where an ad is created/shown:
_bannerAd = BannerAd(
adUnitId: AdState.getAdUnitId(Ads.learningGuideBannerAd)!,
size: AdSize.getInlineAdaptiveBannerAdSize(MediaQuery.of(context).size.width.toInt(), 75),
request: AdRequest(nonPersonalizedAds: getNonPersonalizedAds(context)),
listener: adState.adListener,
);
await _bannerAd!.load();
So my question is, in which other location(s) in my code could the android advertising id be possibly transmitted?
Or could this be caused by one of the packages I'm using:
firebase_core: ^2.21.0
firebase_analytics: ^10.6.3
firebase_crashlytics: ^3.4.3
firebase_auth: ^4.12.1
google_sign_in: ^6.1.5
# flutter_facebook_auth: ^4.4.1+1 #"if you are on macos with an intel processor you must use flutter_facebook_auth: 4.x" from: https://github.com/darwin-morocho/flutter-facebook-auth/issues/326
flutter_facebook_auth: ^5.0.10 #^^but using the newest version works for me
cloud_firestore: ^4.12.2
google_mobile_ads: ^2.4.0
firebase_app_check: ^0.2.1+3
# intl: ^0.18.0
#in_app_purchase: ^3.1.5
#for firebase authentication (not by google)
provider: ^6.0.5
#other
app_tracking_transparency: ^2.0.4 #for iOS
flutter_spinkit: ^5.2.0
shared_preferences: ^2.2.2
flutter_tts: ^3.8.3
connectivity_plus: ^3.0.6 #https://www.youtube.com/watch?v=P2vaBZDSqzg to disable features when flutter_offline:
scrollable_positioned_list: ^0.3.8
url_launcher: ^6.2.1 #hyperlinks
smooth_page_indicator: ^1.1.0 #used in the intro screen
another_flushbar: ^1.12.30 #used in mc words&sentences for example to show alternative translations
styled_text: ^7.0.0
#html_editor_enhanced: ^2.5.1
#flutter_quill: ^6.3.2
#quill_html_editor: ^2.0.5
webview_flutter: ^4.4.2 #the only one I got it to work with, see learning_guide_screen.dart
I found the answer to my solution (I have implemented the changes to my app, and it has been accepted by the Google Play Store).
To prevent the advertising id from being transmitted, you have to set the value
tagForChildDirectedTreatmenttotruein theRequestConfigurationobject of theMobileAds.instance.Source:
"This prevents the transmission of the Android advertising identifier (AAID)."