Prepare Google Play release with age-gated ads and store assets
This commit is contained in:
+49
-15
@@ -1,15 +1,31 @@
|
||||
# Android release preparation
|
||||
|
||||
Status: **not ready for submission**. Lumen targets children and adults. Ad requests currently use child treatment and a G content rating for all users as an interim safeguard; a neutral age screen and verified age-specific consent and ad handling are not yet implemented. Do not ship ads to this audience until the chosen flow has been implemented, reviewed against current Play Families requirements, and tested on devices.
|
||||
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`.
|
||||
- Review [the Android privacy policy](PRIVACY_POLICY.md) and publish [its standalone HTML copy](privacy-policy.html) on a publicly reachable, non-geofenced web page, then enter its URL in Play Console and in the app. The Gitea host and final URL are not yet supplied. Review disclosures against the actual ad SDK, consent, age handling, and any server logs; do not treat the browser playtest privacy text as the production Android policy.
|
||||
- Create/link the Android AdMob app, rewarded and interstitial units. Configure and test Privacy & messaging for applicable regions.
|
||||
- Add the developer website in Play Console and publish the exact AdMob-provided `app-ads.txt` at the domain root. Complete AdMob verification and app readiness review. A Gitea repository page alone may not serve the required file at the domain root.
|
||||
- Complete Play Console's ads, target audience, privacy policy, data safety, content rating and app access declarations using actual app and SDK behavior. If a personal developer account is subject to testing requirements, complete its required closed test before requesting production access.
|
||||
- Privacy policy: the repository copy renders publicly at <https://gitea.softwareapp-hb.de/fishfacegit/logic-puzzle/src/branch/main/docs/PRIVACY_POLICY.md>. 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: <https://softwareapp-hb.de>. The AdMob publisher line is already served at <https://softwareapp-hb.de/app-ads.txt>; 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
|
||||
|
||||
@@ -22,24 +38,42 @@ 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 and both ad unit IDs, and rejects missing signing configuration. These checks validate format and common test IDs; they cannot establish ownership or that an ID is live. A separate explicit build blocker remains in place until the mixed-age flow is implemented and verified.
|
||||
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.
|
||||
|
||||
When all release blockers have been resolved and the AdMob settings are available, supply `ADMOB_APP_ID` as a Gradle property (for example via `ORG_GRADLE_PROJECT_ADMOB_APP_ID`) and build:
|
||||
## 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=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.
|
||||
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 upgrade from the previous release where applicable.
|
||||
- Test consent grant, denial, update/revocation, offline/no-fill, rewarded completion and cancellation, and interstitial lifecycle. Use Google test ads or registered test devices, never live ad interaction.
|
||||
- For the mixed-age audience, verify the neutral age screen, child and unknown-age data handling, certified ad SDK versions and any mediation partners, ad content suitability, and region-specific privacy requirements before advertising.
|
||||
- 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 actual merged release manifest; verify whether advertising ID permission is present and declare it accurately.
|
||||
- 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), [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).
|
||||
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).
|
||||
|
||||
Reference in New Issue
Block a user