我已经超过了谷歌解决这个问题的最后期限(过去几个月我很忙),但这与这个问题无关。
“问题:违反 Google Play 政策”(引自 Google 的电子邮件)
就我的应用程序而言,我确实会展示广告。
我的应用程序还针对儿童和老年受众。
我尝试尽可能合法地展示个性化广告(它们会产生更高的利润),因此我实施了一个中性年龄屏幕,该屏幕在创建帐户之前向用户显示(以查明是否用户是否年满13岁)。
我创建了这个方法
getNonPersonalizedAds(...)
,它检查我的应用程序是否可以向用户显示个性化广告。 isUserChild
(意思是低于/超过 13 岁的用户)是与当前用户帐户关联的 Firestore 文档中的值。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;
}
我确保在我的代码中创建/显示广告的每个位置都会调用
getNonPersonalizedAds(...)
:
_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();
所以我的问题是,我的代码中的哪些其他位置可以传输 android 广告 id?
或者这可能是由我正在使用的软件包之一引起的:
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