Prepare Android release and refine bookshelf
This commit is contained in:
+10
-1
@@ -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());
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user