# Android release preparation Status: **code and store assets are prepared; publisher inputs and final device verification remain.** The intended audience is ages 13 and up: teens and adults. Play Console target bands are 13–15, 16–17 and 18 and over; do not select the 9–12 band. The app now asks for a broad age group before it touches the advertising SDK. Under-13 and unknown-age players receive no ads, teenagers receive child-directed treatment, and adults receive standard treatment. The previous hard build blocker has been removed; real AdMob IDs and upload signing are still required by Gradle preflight checks. ## Age-appropriate advertising - On the first native launch, Settings-style dialog **Choose your age group** offers Under 13, 13–17, 18 and over, or Prefer not to say. Only this choice is stored, under `ad_age_group_v1`; no birth date is collected. - **Under 13** and **Prefer not to say** play without advertising. The app does not call `MobileAds.initialize`, start the ad service, request UMP consent or request rewarded or interstitial ads. Hints and reading breaks continue without an ad. - **13–17** enables ads with `AgeRestrictedTreatment.child`, `tagForUnderAgeOfConsent: true` and `maxAdContentRating: G`. - **18 and over** enables ads with standard age treatment and the same general-audience content rating. - Settings → **Age group** lets the player change the choice. Changing it disposes loaded ads, invalidates in-flight callbacks and restarts the consent gate. Moving to Under 13 or Prefer not to say stops all further ad requests. - The implementation lives in `lib/services/ad_audience.dart`, `lib/services/ads.dart` and `lib/ui/ad_age_group.dart`. Verify on physical devices with the production AdMob configuration, or with registered test devices and Google test ads if only the flow is being checked: 1. Fresh install for each age option; confirm the dialog appears before any ad network traffic. 2. Under 13 and Prefer not to say: no ad initialisation, no consent form, hints and interstitials continue immediately, and the setting persists after restart. 3. Teen and adult: consent grant, refusal and revocation; rewarded completion and cancellation; interstitial dismiss and no-fill; offline and background interruptions. 4. Switch adult → Under 13 and confirm loaded ads disappear and no new requests are made. Switch back and confirm consent and loading restart. ## Publisher decisions and accounts - Working Play title: **Mara’s Island Notebook**. Review the [listing draft](PLAY_STORE_LISTING_DRAFT.md) and complete name and trademark checks before publication. Confirm the package ID before creating the listing: the current ID is `de.softwareapp_hb.lumen.daily`, and a package ID cannot be changed for an existing Play listing. - Support contact: `softwareapp.hb@gmail.com`. - Privacy policy: the repository copy renders publicly at . The standalone [HTML copy](privacy-policy.html) is ready for branded hosting; if it is published elsewhere, build with `--dart-define=PRIVACY_POLICY_URL=THE_PUBLIC_URL` and enter the same URL in Play Console. Review the disclosures against the age flow, actual AdMob configuration and any hosting logs. - Create/link the Android AdMob app plus rewarded and interstitial units. Configure and test Privacy & messaging for applicable regions. - Developer website: . The AdMob publisher line is already served at ; keep it identical to the line AdMob shows and complete AdMob verification and app readiness review. - Complete Play Console's ads, target audience, privacy policy, data safety, content rating and app access declarations against the final release. Start with the [Data safety worksheet](GOOGLE_PLAY_DATA_SAFETY.md). If a personal developer account is subject to testing requirements, complete its required closed test before requesting production access. ## Upload signing Use the existing upload key if this package has ever been published. For a new listing, establish and securely back up an upload key and use Play App Signing. Never commit a keystore or passwords. Provide an external properties file containing: ```properties storeFile=/absolute/path/to/upload-keystore.jks storePassword=YOUR_STORE_PASSWORD keyAlias=YOUR_KEY_ALIAS keyPassword=YOUR_KEY_PASSWORD ``` Set `LUMEN_UPLOAD_PROPERTIES` to that file's absolute path. Restrict access to the file. Production release variants use this upload key; debug variants use debug signing. The production build checks for a non-test AdMob application ID, both ad unit IDs and complete upload-signing configuration. These checks validate format and common test IDs; they cannot establish ownership or that an ID is live. ## Build the store bundle When the release settings are available, supply `ADMOB_APP_ID` as a Gradle property (for example via `ORG_GRADLE_PROJECT_ADMOB_APP_ID`) and build: ```sh flutter build appbundle --release --flavor prod \ --dart-define=ADMOB_REWARDED_ID=YOUR_REWARDED_UNIT_ID \ --dart-define=ADMOB_INTERSTITIAL_ID=YOUR_INTERSTITIAL_UNIT_ID \ --dart-define=PRIVACY_POLICY_URL=YOUR_PUBLIC_POLICY_URL ``` Ad unit IDs are included in the compiled app and are not signing secrets. Do not put passwords in command-line arguments or version control. The version code must be greater than every previously uploaded version for the same package; the current release is `2.0.3+12`. The same build is available through the guarded script: ```sh ADMOB_APP_ID=ca-app-pub-...~... \ ADMOB_REWARDED_ID=ca-app-pub-.../... \ ADMOB_INTERSTITIAL_ID=ca-app-pub-.../... \ LUMEN_UPLOAD_PROPERTIES=/absolute/path/to/upload.properties \ scripts/build_android_release.sh ``` The script refuses Google sample IDs and a missing signing file before invoking Gradle. The AAB includes the R8 mapping under `BUNDLE-METADATA`; the native symbols from `build/app/outputs/native-debug-symbols/prodRelease/` can also be uploaded for native crash symbolication. ## Store assets The tracked [`store/`](../store/README.md) folder contains the upload-ready 512 × 512 icon, 1024 × 500 feature graphic and five 1080 × 1920 phone screenshots. The Android launcher uses an adaptive icon with a matching lighthouse foreground. Regenerate screenshots with `flutter test tool/capture_play_store_test.dart` after visible UI changes. ## Before submission - Verify the final AAB's package, version code, target API, signing certificate, advertising configuration and size. Test the Play-delivered build from an internal testing track on physical devices, including a fresh install and an upgrade from the previous release where applicable. - Run through the age-option matrix above. Use Google test ads or registered test devices, never live ad interaction. - Check accessibility, tablet and phone layouts, audio, stories, offline play and progress persistence. Confirm store listing text, screenshots, icon, category, age rating, support contact and privacy URL match the final app. - Confirm permission and SDK data disclosures with the Google Play SDK Index and the merged release manifest; verify whether the advertising ID permission is present and declare it accurately. References: [Play app content](https://support.google.com/googleplay/android-developer/answer/9859455), [Families policy](https://support.google.com/googleplay/android-developer/answer/9893335), [age treatment](https://developers.google.com/admob/flutter/targeting), [UMP](https://developers.google.com/admob/flutter/privacy), [test ads](https://developers.google.com/admob/flutter/test-ads), [app-ads.txt](https://support.google.com/admob/answer/14538460), [target API](https://support.google.com/googleplay/android-developer/answer/11926878).