Prepare Android release and refine bookshelf

This commit is contained in:
Hadrian Burkhardt
2026-11-15 16:20:17 +01:00
parent fc71accb38
commit 062c798fcc
15 changed files with 530 additions and 193 deletions
+10 -1
View File
@@ -43,8 +43,17 @@ class Ads {
defaultTargetPlatform == TargetPlatform.iOS);
Future<void> start() async {
if (!supported) return;
// Until neutral age screening is implemented, treat all users as children
// and configure the SDK before consent or ad initialization.
await MobileAds.instance.updateRequestConfiguration(
RequestConfiguration(
ageRestrictedTreatment: AgeRestrictedTreatment.child,
maxAdContentRating: MaxAdContentRating.g,
),
);
if (_disposed) return;
ConsentInformation.instance.requestConsentInfoUpdate(
ConsentRequestParameters(),
ConsentRequestParameters(tagForUnderAgeOfConsent: true),
() {
ConsentForm.loadAndShowConsentFormIfRequired((_) => _initialize());
},