Compare commits

...

5 Commits

Author SHA1 Message Date
Hadrian Burkhardt 9b7c1eeb72 Rename Play Store listing from draft to final 2026-11-15 18:58:04 +01:00
Hadrian Burkhardt 1436504629 Add Play Store release notes for 2.0.3+12 2026-11-15 18:56:48 +01:00
Hadrian Burkhardt 57b8bc20b8 Prepare Google Play release with age-gated ads and store assets 2026-11-15 18:54:43 +01:00
Hadrian Burkhardt d73c5fc89a Add Android privacy policy and hosting copy 2026-11-15 16:26:23 +01:00
Hadrian Burkhardt 062c798fcc Prepare Android release and refine bookshelf 2026-11-15 16:20:17 +01:00
55 changed files with 1484 additions and 232 deletions
+4
View File
@@ -12,3 +12,7 @@ __pycache__/
.idea/ .idea/
*.iml *.iml
coverage/ coverage/
# Private upload signing material and build configuration
.release/
android/key.properties
+10 -8
View File
@@ -1,4 +1,4 @@
# Lumen — The Last Light (Flutter 2.0.2) # Lumen — The Last Light (Flutter 2.0.3)
An illustrated island notebook about grandmother Mara, her grandchild, and restoring a lighthouse. The active app is now written in **Dart and Flutter**, with a thin Android Kotlin entry point. All puzzle generation, deductions, story navigation, progress, audio controls and advertising behavior live in `lib/`. An illustrated island notebook about grandmother Mara, her grandchild, and restoring a lighthouse. The active app is now written in **Dart and Flutter**, with a thin Android Kotlin entry point. All puzzle generation, deductions, story navigation, progress, audio controls and advertising behavior live in `lib/`.
@@ -17,6 +17,7 @@ Android is the tested target. iOS project scaffolding and test AdMob configurati
- Solved patterns remain available when turning back from discoveries, including after restarting. Discoveries blend the exact pixel symbol into the watercolour, keep a small copy of the symbol visible, and offer a replay. - Solved patterns remain available when turning back from discoveries, including after restarting. Discoveries blend the exact pixel symbol into the watercolour, keep a small copy of the symbol visible, and offer a replay.
- Local daily streaks, independent difficulty levels and exactly-once puzzle completion awards. - Local daily streaks, independent difficulty levels and exactly-once puzzle completion awards.
- AdMob/UMP consent, optional rewarded hints, practice interstitials after every fourth completion and up to three automatic reading breaks per book (around one-third, two-thirds and the end). Each book remembers its used placements. Automatic ads do not interrupt opening notebook leaves or recorded readings; puzzle hints show ads only after confirmation. - AdMob/UMP consent, optional rewarded hints, practice interstitials after every fourth completion and up to three automatic reading breaks per book (around one-third, two-thirds and the end). Each book remembers its used placements. Automatic ads do not interrupt opening notebook leaves or recorded readings; puzzle hints show ads only after confirmation.
- A first-run age-group choice keeps advertising off for **Under 13** and **Prefer not to say**; teens receive child-directed ad treatment and adults receive standard treatment. Settings can change the choice and open the public privacy policy.
Progress starts fresh in Flutter, as requested. Old Java `lumen.xml` saves are **not imported or read**. Flutter keeps its own local preferences through `shared_preferences`; no account or game backend is required. Uninstalling loses local progress, and the daily date follows the device calendar. Progress starts fresh in Flutter, as requested. Old Java `lumen.xml` saves are **not imported or read**. Flutter keeps its own local preferences through `shared_preferences`; no account or game backend is required. Uninstalling loses local progress, and the daily date follows the device calendar.
@@ -67,13 +68,13 @@ flutter build apk --debug --flavor qa
# Install explicitly with: adb install -r -s PATH_TO_QA_APK # Install explicitly with: adb install -r -s PATH_TO_QA_APK
# The review Huawei rejects SD app installs; use adb install -r -f there. # The review Huawei rejects SD app installs; use adb install -r -f there.
# Optimized development APK for the connected arm64 tablet # Production builds require real AdMob IDs and upload signing.
flutter build apk --release --flavor prod --target-platform android-arm64 # See docs/ANDROID_RELEASE.md and scripts/build_android_release.sh.
``` ```
The normal application ID remains `com.lumen.daily`; version 2.0.2 uses build number 11. The review APK is `artifacts/lumen-flutter-2.0.2-arm64.apk`. Build outputs, screenshots, local SDK paths, IDE state and private signing keys are ignored by Git. `pubspec.lock` is tracked for reproducible package resolution. The normal application ID remains `de.softwareapp_hb.lumen.daily`; the current release is version 2.0.3 (build 12). Generated build outputs, ad-hoc screenshots, local SDK paths, IDE state and private signing keys are ignored by Git; the upload-ready Play assets in `store/` are tracked. `pubspec.lock` is tracked for reproducible package resolution.
The development release build currently uses the Android debug signing key so it can update the installed prototype. **Configure your private upload key before publishing.** No production signing material is included. Production releases require a private upload key and production AdMob IDs. The age-appropriate advertising flow and store assets are in place; the remaining publisher setup is described in [Android release preparation](docs/ANDROID_RELEASE.md).
## Browser playtest ## Browser playtest
@@ -118,7 +119,8 @@ The physical-device integration test uses a disposable in-memory game plus an is
| `lib/domain/book.dart` | Stable story records and campaign asset loading | | `lib/domain/book.dart` | Stable story records and campaign asset loading |
| `lib/domain/game.dart` | Routing, marks, undo, progress, streaks and completion | | `lib/domain/game.dart` | Routing, marks, undo, progress, streaks and completion |
| `lib/ui/` | Page layout, margin gestures, native grid semantics and illustrated keepsakes | | `lib/ui/` | Page layout, margin gestures, native grid semantics and illustrated keepsakes |
| `lib/services/` | Local storage, bundled playback and consent-gated AdMob | | `lib/services/` | Local storage, bundled playback, age-gated consent and AdMob |
| `store/` | Upload-ready Play icon, feature graphic, phone screenshots and app-ads.txt |
| `assets/campaign.json` | Authored twelve-picture campaign | | `assets/campaign.json` | Authored twelve-picture campaign |
| `assets/narration/STORY.md` | Lighthouse manuscript; compile with `tool/compile_mara_story.py` | | `assets/narration/STORY.md` | Lighthouse manuscript; compile with `tool/compile_mara_story.py` |
| `assets/narration/scripts.json` | Compiled spoken text and cast segments | | `assets/narration/scripts.json` | Compiled spoken text and cast segments |
@@ -129,9 +131,9 @@ For an agent-oriented architecture, dependency, screen-flow and persistence map,
## Before publishing ## Before publishing
Create your production Android AdMob app and ad units, configure Privacy & messaging, supply a public privacy policy and support contact, complete Play disclosures and ratings, and configure an upload key outside Git. The SDK still uses Google test IDs by default. The release code and [store assets](store/README.md) are prepared. Remaining work is publisher-side: create the production Android AdMob app and ad units, configure Privacy & messaging, confirm the public privacy policy URL (the [policy](docs/PRIVACY_POLICY.md) renders on the repository host; the standalone [HTML copy](docs/privacy-policy.html) can be hosted on the developer site), complete Play disclosures and ratings, and configure an upload key outside Git. The SDK still uses Google test IDs by default.
For Android, supply the app ID using Gradle property `ADMOB_APP_ID`. Rewarded/interstitial unit IDs use Dart compile-time defines `ADMOB_REWARDED_ID` and `ADMOB_INTERSTITIAL_ID`. iOS needs its own app ID in `ios/Runner/Info.plist` and iOS-specific ad unit IDs. Verify consent refusal/revocation, reward completion/cancellation, offline/no-fill behavior, lifecycle interruptions, accessibility and release signing on physical devices before submitting an AAB. For Android, supply the app ID using Gradle property `ADMOB_APP_ID`. Rewarded/interstitial unit IDs use Dart compile-time defines `ADMOB_REWARDED_ID` and `ADMOB_INTERSTITIAL_ID`; the public policy can be overridden with `PRIVACY_POLICY_URL`. iOS needs its own app ID in `ios/Runner/Info.plist` and iOS-specific ad unit IDs. Verify consent refusal/revocation, reward completion/cancellation, offline/no-fill behavior, lifecycle interruptions, accessibility and release signing on physical devices before submitting an AAB. See [Android release preparation](docs/ANDROID_RELEASE.md) for the age-option test matrix.
See [ROADMAP.md](ROADMAP.md) for the proposed 30–40-leaf campaign, page variety and further exploration ideas. Smaller follow-ups and asset tasks are tracked in [TODO.md](TODO.md). See [ROADMAP.md](ROADMAP.md) for the proposed 30–40-leaf campaign, page variety and further exploration ideas. Smaller follow-ups and asset tasks are tracked in [TODO.md](TODO.md).
+64 -9
View File
@@ -1,9 +1,22 @@
import java.util.Base64
import java.util.Properties
plugins { plugins {
id("com.android.application") id("com.android.application")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin") id("dev.flutter.flutter-gradle-plugin")
} }
val uploadProperties = Properties()
val uploadPropertiesPath = providers.gradleProperty("LUMEN_UPLOAD_PROPERTIES")
.orElse(providers.environmentVariable("LUMEN_UPLOAD_PROPERTIES"))
.orNull
if (uploadPropertiesPath != null) {
val propertiesFile = file(uploadPropertiesPath)
require(propertiesFile.isFile) { "Upload signing properties file does not exist." }
propertiesFile.inputStream().use { uploadProperties.load(it) }
}
android { android {
namespace = "com.lumen.daily" namespace = "com.lumen.daily"
compileSdk = flutter.compileSdkVersion compileSdk = flutter.compileSdkVersion
@@ -15,8 +28,7 @@ android {
} }
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "de.softwareapp_hb.lumen.daily"
applicationId = "com.lumen.daily"
// You can update the following values to match your application needs. // You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config. // For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 24 minSdk = 24
@@ -30,19 +42,25 @@ android {
manifestPlaceholders["admobAppId"] = providers.gradleProperty("ADMOB_APP_ID").getOrElse("ca-app-pub-3940256099942544~3347511713") manifestPlaceholders["admobAppId"] = providers.gradleProperty("ADMOB_APP_ID").getOrElse("ca-app-pub-3940256099942544~3347511713")
} }
signingConfigs {
create("upload") {
uploadProperties.getProperty("storeFile")?.let { storeFile = file(it) }
storePassword = uploadProperties.getProperty("storePassword")
keyAlias = uploadProperties.getProperty("keyAlias")
keyPassword = uploadProperties.getProperty("keyPassword")
}
}
flavorDimensions += "edition" flavorDimensions += "edition"
productFlavors { productFlavors {
create("prod") { dimension = "edition" } create("prod") { dimension = "edition"; signingConfig = signingConfigs.getByName("upload") }
create("qa") { dimension = "edition"; applicationIdSuffix = ".qa"; versionNameSuffix = "-qa" } create("qa") { dimension = "edition"; applicationId = "com.lumen.daily.qa"; versionNameSuffix = "-qa" }
create("check") { dimension = "edition"; applicationIdSuffix = ".check"; versionNameSuffix = "-check" } create("check") { dimension = "edition"; applicationId = "com.lumen.daily.check"; versionNameSuffix = "-check" }
} }
buildTypes { buildTypes {
debug { signingConfig = signingConfigs.getByName("debug") }
release { release {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
// Supply a private upload key before publishing. Never release with a debug key.
signingConfig = signingConfigs.getByName("debug")
} }
} }
} }
@@ -56,3 +74,40 @@ kotlin {
flutter { flutter {
source = "../.." source = "../.."
} }
// Never produce a production release with sample ad IDs or a debug key.
gradle.taskGraph.whenReady {
if (allTasks.any { it.project == project && it.name.contains("ProdRelease", ignoreCase = true) }) {
val appId = providers.gradleProperty("ADMOB_APP_ID").orNull ?: ""
val validAppId = Regex("ca-app-pub-[0-9]{16}~[0-9]{10}")
require(validAppId.matches(appId) && !appId.startsWith("ca-app-pub-3940256099942544~")) {
"Production release requires a real ADMOB_APP_ID Gradle property."
}
val defines = providers.gradleProperty("dart-defines").orNull.orEmpty()
.split(",").filter { it.isNotBlank() }.mapNotNull {
runCatching { String(Base64.getDecoder().decode(it), Charsets.UTF_8) }.getOrNull()
}.mapNotNull { value ->
val index = value.indexOf('=')
if (index < 0) null else value.substring(0, index) to value.substring(index + 1)
}.toMap()
val validUnitId = Regex("ca-app-pub-[0-9]{16}/[0-9]{10}")
for (name in listOf("ADMOB_REWARDED_ID", "ADMOB_INTERSTITIAL_ID")) {
val id = defines[name].orEmpty()
require(validUnitId.matches(id) && !id.startsWith("ca-app-pub-3940256099942544/")) {
"Production release requires a real $name Dart define."
}
}
for (name in listOf("storeFile", "storePassword", "keyAlias", "keyPassword")) {
require(!uploadProperties.getProperty(name).isNullOrBlank()) {
"Production release requires $name in the upload signing properties file."
}
}
require(file(uploadProperties.getProperty("storeFile")).isFile) {
"Production upload keystore does not exist."
}
// Age-appropriate consent and advertising are implemented in the app:
// under-13 and unknown-age players never initialize the ad SDK, teens
// receive child-directed treatment, and adults receive standard
// treatment. Real AdMob IDs and upload signing remain mandatory.
}
}
+12 -2
View File
@@ -2,11 +2,15 @@
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application <application
android:label="Lumen" android:label="Mara’s Island Notebook"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@drawable/ic_launcher" android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:appCategory="game"
android:supportsRtl="true"
android:allowBackup="false" android:allowBackup="false"
android:fullBackupContent="false" android:fullBackupContent="false"
android:usesCleartextTraffic="false"
android:dataExtractionRules="@xml/data_extraction_rules"> android:dataExtractionRules="@xml/data_extraction_rules">
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="${admobAppId}"/> <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="${admobAppId}"/>
<activity <activity
@@ -47,5 +51,11 @@
<action android:name="android.intent.action.PROCESS_TEXT"/> <action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/> <data android:mimeType="text/plain"/>
</intent> </intent>
<!-- Settings → Privacy policy opens the public HTTPS policy in a browser. -->
<intent>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https"/>
</intent>
</queries> </queries>
</manifest> </manifest>
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Lighthouse foreground for the adaptive launcher icon. The artwork is
scaled into the 72dp adaptive-icon safe zone. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group
android:scaleX="0.72"
android:scaleY="0.72"
android:pivotX="54"
android:pivotY="54">
<path
android:fillColor="#E0B568"
android:fillAlpha="0.5"
android:pathData="M58,34L7,19L7,49z" />
<path
android:fillColor="#F3E7CC"
android:pathData="M53,45L68,45L76,87L45,87z" />
<path
android:fillColor="#A35C48"
android:pathData="M49,65L72,65L73,73L48,73z" />
<path
android:fillColor="#E0B568"
android:pathData="M51,31h19v12h-19z" />
<path
android:fillColor="#172F3A"
android:pathData="M46,30L61,18L76,30z M47,43h27v5h-27z M57,77h8v10h-8z" />
<path
android:fillColor="#8A9F9B"
android:pathData="M14,92h80v2h-80z M19,98h38v1h-38z M68,98h22v1h-22z" />
</group>
</vector>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#274956</color>
</resources>
+17 -1
View File
@@ -1,4 +1,11 @@
{ {
"Mara’s\nisland notebook": "Maras\nInselnotizbuch",
"Lumen uses open-source software and fonts. Choose a component to read its notices.": "Lumen verwendet Open-Source-Software und Schriftarten. Wähle eine Komponente, um ihre Lizenztexte zu lesen.",
"Lumen uses open-source software and fonts. Identical notices are shown once, with all associated components listed below.": "Lumen verwendet Open-Source-Software und Schriftarten. Identische Lizenztexte werden einmal angezeigt; die zugehörigen Komponenten stehen jeweils dabei.",
"View license notice": "Lizenztext anzeigen",
"Licenses could not be loaded.": "Die Lizenzen konnten nicht geladen werden.",
"Light the number of cells shown beside each row and above each column. Tap a cell to cycle through light, cross and empty. Mark every cell to finish; dotted cells are fixed clues.\n\nSome puzzles have overlapping areas with their own totals. A shared cell counts in every area it belongs to. Compare the totals to work out which cells to light.\n\nSpecial symbols add clues: matching stars have the same state; exactly one of a matching pair of lanterns is lit; and exactly two touching footprints are lit. Some totals are hidden: use the clue on the page to find them.\n\nStory puzzles reveal memories. Find a daily puzzle or explore island postcards from the bookshelf.": "Erhelle in jeder Zeile und Spalte genau so viele Felder, wie die Zahl daneben oder darüber angibt. Tippe auf ein Feld, um zwischen Licht, Kreuz und leer zu wechseln. Markiere alle Felder, um das Rätsel zu lösen; gepunktete Felder sind feste Vorgaben.\n\nEinige Rätsel enthalten überlappende Bereiche mit eigenen Summen. Ein gemeinsames Feld zählt in jedem Bereich, zu dem es gehört. Vergleiche die Summen, um herauszufinden, welche Felder leuchten.\n\nBesondere Symbole geben weitere Hinweise: Gleiche Sterne haben denselben Zustand; von zwei gleichen Laternen leuchtet genau eine; und genau zwei sich berührende Fußspuren leuchten. Manche Summen sind verborgen: Nutze den Hinweis auf der Seite, um sie zu finden.\n\nGeschichtenrätsel enthüllen Erinnerungen. Das Tagesrätsel und die Inselpostkarten findest du im Bücherregal.",
"Hints are optional. Watch a rewarded ad to reveal a cell and its explanation; your puzzle remains available if no ad can be shown. Streaks count consecutive daily completions on this device.": "Hinweise sind freiwillig. Sieh dir ein Werbevideo an, um ein Feld und seine Erklärung zu erhalten; dein Rätsel bleibt verfügbar, wenn keine Werbung gezeigt werden kann. Eine Serie zählt aufeinanderfolgende tägliche Abschlüsse auf diesem Gerät.",
"Settings": "Einstellungen", "Settings": "Einstellungen",
"A SMALL DAILY RITUAL": "EIN KLEINES TÄGLICHES RITUAL", "A SMALL DAILY RITUAL": "EIN KLEINES TÄGLICHES RITUAL",
"A careful repair": "Eine sorgsame Reparatur", "A careful repair": "Eine sorgsame Reparatur",
@@ -209,5 +216,14 @@
"Next pattern →": "Nächstes Muster →", "Next pattern →": "Nächstes Muster →",
"Back to postcards": "Zurück zu den Postkarten", "Back to postcards": "Zurück zu den Postkarten",
"POSTCARD / {0} / PATTERN {1} OF 3": "POSTKARTE / {0} / MUSTER {1} VON 3", "POSTCARD / {0} / PATTERN {1} OF 3": "POSTKARTE / {0} / MUSTER {1} VON 3",
"Illustrated postcards · English · Recorded readings": "Illustrierte Postkarten · Englisch · Vertonte Lesungen" "Illustrated postcards · English · Recorded readings": "Illustrierte Postkarten · Englisch · Vertonte Lesungen",
"Choose your age group": "Wähle deine Altersgruppe",
"We use this only to choose advertising settings. Under 13 and Prefer not to say play without ads. Your choice stays on this device.": "Wir verwenden die Angabe nur, um die Werbeeinstellungen zu wählen. Unter 13 und „Keine Angabe“ spielen ohne Werbung. Deine Auswahl bleibt auf diesem Gerät.",
"Under 13": "Unter 13",
"13–17": "13–17",
"18 and over": "18 und älter",
"Prefer not to say": "Keine Angabe",
"Age group": "Altersgruppe",
"Privacy policy": "Datenschutzerklärung",
"Advertising is off because this device is set to Under 13 or Prefer not to say. No ads are requested. You can change the age group in Settings.\n\nGame progress stays on this device. No account or game backend is used.": "Werbung ist ausgeschaltet, weil für dieses Gerät „Unter 13“ oder „Keine Angabe“ gewählt wurde. Es werden keine Anzeigen angefordert. Du kannst die Altersgruppe in den Einstellungen ändern.\n\nDer Spielfortschritt bleibt auf diesem Gerät. Es gibt kein Konto und keinen Spielserver."
} }
+17 -1
View File
@@ -1,4 +1,11 @@
{ {
"Mara’s\nisland notebook": "Mara’s\nisland notebook",
"Lumen uses open-source software and fonts. Choose a component to read its notices.": "Lumen uses open-source software and fonts. Choose a component to read its notices.",
"Lumen uses open-source software and fonts. Identical notices are shown once, with all associated components listed below.": "Lumen uses open-source software and fonts. Identical notices are shown once, with all associated components listed below.",
"View license notice": "View license notice",
"Licenses could not be loaded.": "Licenses could not be loaded.",
"Light the number of cells shown beside each row and above each column. Tap a cell to cycle through light, cross and empty. Mark every cell to finish; dotted cells are fixed clues.\n\nSome puzzles have overlapping areas with their own totals. A shared cell counts in every area it belongs to. Compare the totals to work out which cells to light.\n\nSpecial symbols add clues: matching stars have the same state; exactly one of a matching pair of lanterns is lit; and exactly two touching footprints are lit. Some totals are hidden: use the clue on the page to find them.\n\nStory puzzles reveal memories. Find a daily puzzle or explore island postcards from the bookshelf.": "Light the number of cells shown beside each row and above each column. Tap a cell to cycle through light, cross and empty. Mark every cell to finish; dotted cells are fixed clues.\n\nSome puzzles have overlapping areas with their own totals. A shared cell counts in every area it belongs to. Compare the totals to work out which cells to light.\n\nSpecial symbols add clues: matching stars have the same state; exactly one of a matching pair of lanterns is lit; and exactly two touching footprints are lit. Some totals are hidden: use the clue on the page to find them.\n\nStory puzzles reveal memories. Find a daily puzzle or explore island postcards from the bookshelf.",
"Hints are optional. Watch a rewarded ad to reveal a cell and its explanation; your puzzle remains available if no ad can be shown. Streaks count consecutive daily completions on this device.": "Hints are optional. Watch a rewarded ad to reveal a cell and its explanation; your puzzle remains available if no ad can be shown. Streaks count consecutive daily completions on this device.",
"Settings": "Settings", "Settings": "Settings",
"A SMALL DAILY RITUAL": "A SMALL DAILY RITUAL", "A SMALL DAILY RITUAL": "A SMALL DAILY RITUAL",
"A careful repair": "A careful repair", "A careful repair": "A careful repair",
@@ -209,5 +216,14 @@
"Next pattern →": "Next pattern →", "Next pattern →": "Next pattern →",
"Back to postcards": "Back to postcards", "Back to postcards": "Back to postcards",
"POSTCARD / {0} / PATTERN {1} OF 3": "POSTCARD / {0} / PATTERN {1} OF 3", "POSTCARD / {0} / PATTERN {1} OF 3": "POSTCARD / {0} / PATTERN {1} OF 3",
"Illustrated postcards · English · Recorded readings": "Illustrated postcards · English · Recorded readings" "Illustrated postcards · English · Recorded readings": "Illustrated postcards · English · Recorded readings",
"Choose your age group": "Choose your age group",
"We use this only to choose advertising settings. Under 13 and Prefer not to say play without ads. Your choice stays on this device.": "We use this only to choose advertising settings. Under 13 and Prefer not to say play without ads. Your choice stays on this device.",
"Under 13": "Under 13",
"13–17": "13–17",
"18 and over": "18 and over",
"Prefer not to say": "Prefer not to say",
"Age group": "Age group",
"Privacy policy": "Privacy policy",
"Advertising is off because this device is set to Under 13 or Prefer not to say. No ads are requested. You can change the age group in Settings.\n\nGame progress stays on this device. No account or game backend is used.": "Advertising is off because this device is set to Under 13 or Prefer not to say. No ads are requested. You can change the age group in Settings.\n\nGame progress stays on this device. No account or game backend is used."
} }
+79
View File
@@ -0,0 +1,79 @@
# 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
- Play title: **Mara’s Island Notebook**. Review the [Play Store listing](PLAY_STORE_LISTING.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 <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
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).
+16 -5
View File
@@ -6,7 +6,7 @@
## 30-second summary ## 30-second summary
- **What it is:** an offline illustrated logic-puzzle notebook ("Lumen", version 2.0.2+11). - **What it is:** an offline illustrated logic-puzzle notebook ("Lumen", version 2.0.3+12).
- **Stack:** Flutter 3.47.5 / Dart 3.13.4, Material widgets, no backend and no account. - **Stack:** Flutter 3.47.5 / Dart 3.13.4, Material widgets, no backend and no account.
- **Entry point:** `main()` in `lib/main.dart` → `StoryLibrary.load()` + `Progress.load()` → open selected story/language → `Game(...)` → `await game.restore()` → `game.showLibrary()` → `runApp(LumenApp(game: game))`. The shelf is the first window; `restore()` has already positioned each book's saved leaf so choosing a book resumes it. `Book.load()` remains an English Mara compatibility loader for existing tests/tools. - **Entry point:** `main()` in `lib/main.dart` → `StoryLibrary.load()` + `Progress.load()` → open selected story/language → `Game(...)` → `await game.restore()` → `game.showLibrary()` → `runApp(LumenApp(game: game))`. The shelf is the first window; `restore()` has already positioned each book's saved leaf so choosing a book resumes it. `Book.load()` remains an English Mara compatibility loader for existing tests/tools.
- **State:** one `Game extends ChangeNotifier` (`lib/domain/game.dart`) owns the current screen, puzzle session, marks, undo history and progress. `_NotebookState` listens to it and rebuilds the active screen. - **State:** one `Game extends ChangeNotifier` (`lib/domain/game.dart`) owns the current screen, puzzle session, marks, undo history and progress. `_NotebookState` listens to it and rebuilds the active screen.
@@ -40,11 +40,13 @@ lib/
│ ├── progress.dart Progress — typed façade over SharedPreferencesAsync │ ├── progress.dart Progress — typed façade over SharedPreferencesAsync
│ ├── ambience.dart Ambience, Soundscape — location loops, fades and narration ducking │ ├── ambience.dart Ambience, Soundscape — location loops, fades and narration ducking
│ ├── narrator.dart Narrator — just_audio playback and passage cues │ ├── narrator.dart Narrator — just_audio playback and passage cues
│ └── ads.dart Ads — UMP consent, rewarded hints, interstitials │ ├── ad_audience.dart AdAudience — local age group and ad treatment
│ └── ads.dart Ads — age-gated UMP consent, rewarded hints, interstitials
└── ui/ └── ui/
├── paper.dart Paper, Leaf, Cover, Sketch, InkButton, PageSwipeBlocker ├── paper.dart Paper, Leaf, Cover, Sketch, InkButton, PageSwipeBlocker
├── board.dart Board, PencilMark painter, PixelPicture, PatternStamp ├── board.dart Board, PencilMark painter, PixelPicture, PatternStamp
├── discovery.dart Discovery — pattern-to-art transition and replay ├── discovery.dart Discovery — pattern-to-art transition and replay
├── ad_age_group.dart Age-group choice shown before advertising starts
├── translation.dart CopyScope, CopyText — translated controls, locale parsing and font fallback ├── translation.dart CopyScope, CopyText — translated controls, locale parsing and font fallback
└── mara_story.dart Original-story presenter (part of main.dart); standard packages use standardStory └── mara_story.dart Original-story presenter (part of main.dart); standard packages use standardStory
@@ -325,6 +327,12 @@ All writes go through `Progress.set` (memory is updated synchronously, disk is w
| `notebook_read_ahead` | bool | `turn()` | Written when leaving the unsolved story puzzle; currently no reader | | `notebook_read_ahead` | bool | `turn()` | Written when leaving the unsolved story puzzle; currently no reader |
| `viewed_<pageId>` | bool | `Game.showStory` | Written per visited leaf; currently no reader | | `viewed_<pageId>` | bool | `Game.showStory` | Written per visited leaf; currently no reader |
### Advertising
| Key | Type | Written by | Purpose |
| --- | --- | --- | --- |
| `ad_age_group_v1` | String | age-group dialog | `under13` / `teen` / `adult` / `unknown`; Under 13 and unknown never initialize the ad SDK, teens use child-directed treatment and adults standard treatment |
### Puzzle progress and awards ### Puzzle progress and awards
| Key | Type | Written by | Purpose | | Key | Type | Written by | Purpose |
@@ -414,12 +422,15 @@ Board key formats (`<key>`):
| `test/library_test.dart` | All registered packages/locales, unique puzzles, identity-safe overlays, fallback/audio, independent story saves, live language switching, variable chapters, UI placeholders and invalid content | | `test/library_test.dart` | All registered packages/locales, unique puzzles, identity-safe overlays, fallback/audio, independent story saves, live language switching, variable chapters, UI placeholders and invalid content |
| `test/library_widget_test.dart` | Bookshelf as the app's first window (all books listed and one opened), actual library/language controls, translated metadata, German at larger text in both orientations, Arabic RTL/font behavior | | `test/library_widget_test.dart` | Bookshelf as the app's first window (all books listed and one opened), actual library/language controls, translated metadata, German at larger text in both orientations, Arabic RTL/font behavior |
| `test/puzzle_test.dart` | 40 Java reference boards (signed 64-bit seeds), 300 graded boards, solver counts vs. exhaustive search, campaign uniqueness/no-guess, streaks, fresh progress, read-ahead, daily awards and practice levels | | `test/puzzle_test.dart` | 40 Java reference boards (signed 64-bit seeds), 300 graded boards, solver counts vs. exhaustive search, campaign uniqueness/no-guess, streaks, fresh progress, read-ahead, daily awards and practice levels |
| `test/ad_audience_test.dart` | Age-group mapping, fail-closed stored values, no ad requests for Under 13/unknown, every dialog option and first-launch persistence |
| `test/widget_test.dart` | Pattern-to-art timing/replay, back-to-solved-grid navigation, rewarded hints in all modes, declined/unavailable ads and duplicate/stale callbacks, page swipes vs. grid drags, swipes over text/blank paper, vertical scrolling and cancelled drags, small/landscape/1.5× text, landscape two-column puzzle leaf, illustrated campaign reveals and pixel fallback at 1.5× text | | `test/widget_test.dart` | Pattern-to-art timing/replay, back-to-solved-grid navigation, rewarded hints in all modes, declined/unavailable ads and duplicate/stale callbacks, page swipes vs. grid drags, swipes over text/blank paper, vertical scrolling and cancelled drags, small/landscape/1.5× text, landscape two-column puzzle leaf, illustrated campaign reveals and pixel fallback at 1.5× text |
| `integration_test/library_test.dart` | Isolated on-device bookshelf start, English/German switching, shared marks/bookmark/undo, story isolation, read-ahead and exactly-once completion; five screenshots | | `integration_test/library_test.dart` | Isolated on-device bookshelf start, English/German switching, shared marks/bookmark/undo, story isolation, read-ahead and exactly-once completion; five screenshots |
| `integration_test/notebook_test.dart` | On-device QA flow: six leaves, real WAV playback and pause/resume, bookmarks/discoveries, match and lantern solves, exactly-once awards, QA disk round-trip, screenshots | | `integration_test/notebook_test.dart` | On-device QA flow: six leaves, real WAV playback and pause/resume, bookmarks/discoveries, match and lantern solves, exactly-once awards, QA disk round-trip, screenshots |
| `integration_test/cottage_test.dart` | All sixteen leaves, larger-text portrait/landscape, bookmarks, legacy-key marks, all four awards, all 23 narrator tracks and isolated test persistence; eight screenshots | | `integration_test/cottage_test.dart` | All sixteen leaves, larger-text portrait/landscape, bookmarks, legacy-key marks, all four awards, all 23 narrator tracks and isolated test persistence; eight screenshots |
| `integration_test/discovery_art_test.dart` | QA tablet screenshots of all twelve discoveries and the opening match memory, portrait/landscape at 1.5× text; checks reachable controls and unchanged awards | | `integration_test/discovery_art_test.dart` | QA tablet screenshots of all twelve discoveries and the opening match memory, portrait/landscape at 1.5× text; checks reachable controls and unchanged awards |
| `tool/shelf_screenshots_test.dart` | Renders the bookshelf at phone (360×640, 390×844, 1.5× text) and tablet (800×1280, 1280×800) metrics, asserts every card and Settings stay reachable without overflow, and writes `artifacts/library/shelf-*.png` | | `tool/shelf_screenshots_test.dart` | Renders the bookshelf at phone (360×640, 390×844, 1.5× text) and tablet (800×1280, 1280×800) metrics, asserts every card and Settings stay reachable without overflow, and writes `artifacts/library/shelf-*.png` |
| `tool/capture_play_store_test.dart` | Renders five 1080×1920 Play Store phone screenshots from the real app at a 360×640 viewport and 3× output |
| `scripts/build_android_release.sh` | Guarded production AAB build; requires real AdMob IDs and upload signing and refuses Google sample IDs |
| `scripts/check_story_package.py` | Independent story script/cue/audio/master/archive and illustration validation | | `scripts/check_story_package.py` | Independent story script/cue/audio/master/archive and illustration validation |
| `scripts/check_narration_assets.py` | Script text ↔ manifest ↔ WAV masters checksums | | `scripts/check_narration_assets.py` | Script text ↔ manifest ↔ WAV masters checksums |
| `scripts/check_flutter_install.py` | Read-only installed-app smoke check and screenshots | | `scripts/check_flutter_install.py` | Read-only installed-app smoke check and screenshots |
@@ -502,10 +513,10 @@ Each run checks four discoveries in both orientations at 1.5× text, including n
- **Generated boards are 7×7 without regions.** Authored campaign boards can have A/B/C areas. Legacy 5×5 save keys are retained but their marks are not mapped onto new grids. - **Generated boards are 7×7 without regions.** Authored campaign boards can have A/B/C areas. Legacy 5×5 save keys are retained but their marks are not mapped onto new grids.
- **Landscape side columns scroll.** With very large text, notes or hint/undo can need scrolling; never shrink text to force a fit (see the root `ROADMAP.md`: keep vertical scrolling as the accessibility fallback). - **Landscape side columns scroll.** With very large text, notes or hint/undo can need scrolling; never shrink text to force a fit (see the root `ROADMAP.md`: keep vertical scrolling as the accessibility fallback).
- **Gesture layering is deliberate.** `PageSwipeBlocker` wins horizontal drags inside boards/buttons while letting vertical drags scroll. Adding another horizontal recogniser around a board can break page turns or mark gestures. - **Gesture layering is deliberate.** `PageSwipeBlocker` wins horizontal drags inside boards/buttons while letting vertical drags scroll. Adding another horizontal recogniser around a board can break page turns or mark gestures.
- **Ads are optional by design.** `adsEnabled: false` in tests, `supported` guard in the service, and `between()` always routes even on no-fill. - **Ads are age-gated.** `AdAudience` stores only a broad local group; Under 13 and unknown-age players never initialize the ad SDK. Teens use child-directed treatment and adults standard treatment. `adsEnabled: false` in tests, `supported` guard in the service, and `between()` always routes even on no-fill.
- **Narration assets are checksum-locked.** `check_narration_assets.py` requires the scripts, manifests and WAV masters to agree; edit them together. - **Narration assets are checksum-locked.** `check_narration_assets.py` requires the scripts, manifests and WAV masters to agree; edit them together.
- **QA integration test fails without `--dart-define=QA_TEST=true`** and should run on the `qa` flavour (`com.lumen.daily.qa`). - **QA integration test fails without `--dart-define=QA_TEST=true`** and should run on the `qa` flavour (`com.lumen.daily.qa`).
- **`build/`, `artifacts/`, `.dart_tool/`, IDE state and signing keys are ignored.** Do not commit APKs or screenshots; `pubspec.lock` is tracked. - **`build/`, `artifacts/`, `.dart_tool/`, IDE state and signing keys are ignored.** Do not commit APKs or generated screenshots; upload-ready Play assets in `store/` are intentionally tracked, and `pubspec.lock` is tracked.
## Grep anchors ## Grep anchors
@@ -537,7 +548,7 @@ grep -rn "ValueKey('cell-\|leaf-scroll\|leaf-side-scroll" lib test
python3 scripts/check_soundscape_assets.py` after structural edits. python3 scripts/check_soundscape_assets.py` after structural edits.
- The map is hand-maintained; no generator or CI check keeps it current, so treat drift as a bug. - The map is hand-maintained; no generator or CI check keeps it current, so treat drift as a bug.
_Last reviewed against version 2.0.2+11._ _Last reviewed against version 2.0.3+12._
The cast diary audio system adds `lib/domain/soundscape.dart` (package-defined loops), The cast diary audio system adds `lib/domain/soundscape.dart` (package-defined loops),
`narration/cast.json` and segmented scripts in the Halloween package, plus `narration/cast.json` and segmented scripts in the Halloween package, plus
+56
View File
@@ -0,0 +1,56 @@
# Google Play Data safety working answers
App: Mara’s Island Notebook · `de.softwareapp_hb.lumen.daily`
Prepared 15 November 2026 from the current code. This is a form worksheet, not a submitted or final declaration. Recheck against the signed release and final AdMob configuration, including the age-option behavior below.
## Initial questions
| Question | Working answer |
| --- | --- |
| Does the app collect or share any of the listed data types? | **Yes**, through Google's advertising services for players who choose **13–17** or **18 and over**. Players who choose **Under 13** or **Prefer not to say** receive no ads; the app does not start the ad service or request ads for them. |
| Is collected data encrypted in transit? | Google documents TLS for the Mobile Ads SDK. Verify UMP and any other final network paths before confirming **Yes** for all collected data. |
| Can users create an account? | **No**. There is no account creation or sign-in. |
| Can users request deletion? | **Not yet verified for all collected data.** Clearing local storage or providing a support email alone does not establish deletion of Google's SDK data. |
| Independent security review? | **No**; no such review has been completed. |
| Families-policy commitment? | **No.** The intended audience is 13+ and Play target bands are 13–15, 16–17 and 18+. Under-13 players can still play with advertising disabled, but the app is not directed at children and does not enroll in Families. |
| Privacy policy URL | <https://gitea.softwareapp-hb.de/fishfacegit/logic-puzzle/src/branch/main/docs/PRIVACY_POLICY.md> (public HTML rendering). A standalone HTML copy is ready in [privacy-policy.html](privacy-policy.html) for branded hosting. |
## AdMob-related categories to review
This mapping is based on Google's default SDK disclosure, rather than a measurement of the final release. Its applicability must be checked against the age-gated, restricted ad requests for the audiences that enable ads and against all included SDKs.
| Play category | Data type | Working treatment |
| --- | --- | --- |
| Location | Approximate location | Collected/shared via advertising; IP-derived location counts even without location permission. |
| App activity | App interactions | Collected/shared by the advertising SDK. |
| App info and performance | Diagnostics | Collected/shared by the advertising SDK. |
| Device or other IDs | Device or other IDs | **Verify before submission.** Age treatment differs: 13–17 restricts identifiers, while 18+ uses standard treatment. Do not assume either that all default identifiers are transmitted or that none are. |
Google lists advertising, analytics and fraud prevention as SDK purposes. Map these to **Advertising or marketing**, **Analytics**, and **Fraud prevention, security, and compliance** where applicable to each data type. Do not add account management or personalization merely because ads exist.
SDK: `google_mobile_ads` 9.2.0 selects `play-services-ads` 25.5.0 by default, plus UMP 4.0.0. No Next-Gen SDK flag is configured in this project.
The merged Android manifest includes advertising identifier permissions. Permissions alone do not prove data transmission. The app stores a broad age group locally: Under 13/Prefer not to say never initialize the ad SDK; 13–17 sets `AgeRestrictedTreatment.child` and `tagForUnderAgeOfConsent: true`; 18+ uses standard age treatment. All enabled audiences use `maxAdContentRating: G`. Verify actual restricted SDK behavior and any AdMob ad partners before completing identifier declarations.
## Collection choices
- Do not mark ad-related collection **optional** solely because rewarded hints are optional. For players who choose an ad-enabled age group, the app starts consent/ad initialization automatically and has no separate universal in-app switch to disable advertising data collection. Choosing Under 13 is an age declaration, not a general privacy toggle. A regional consent choice or playing offline is not a universal opt-out.
- Do not claim **ephemeral processing** without evidence that the relevant off-device data meets Google's definition. No SDK retention verification has been completed here.
- Review Google's sharing exceptions before claiming an exemption; do not assume every advertising transfer is exempt as a service-provider transfer.
## Local data and unsupported categories
Progress, puzzle marks, bookmarks, the broad age-group choice, settings and the developer's local session/revenue counters are stored through `Progress` and `PlayMetrics`, with no automatic developer upload. Keep these separate from SDK interaction data.
The game has no sign-in, payment collection, contacts access, camera or microphone capture, or precise-location request. Bundled narration is not a user audio recording, and ad-revenue estimates are not a user's financial information. No separate crash-upload service was found; do not select crash logs solely because the form also offers diagnostics. Recheck SDK disclosures if crash reporting is introduced.
Support email is handled outside the game's own input flow. Reassess personal-information/message declarations if an in-app support form or attachment upload is added.
## Sources and limits
- [Google Mobile Ads SDK data disclosure](https://developers.google.com/admob/android/privacy/play-data-disclosure) — the current published disclosure covers 25.5.0.
- [Play Data safety form guidance](https://support.google.com/googleplay/android-developer/answer/10787469) — definitions, categories and exceptions.
- [Age treatment](https://developers.google.com/admob/flutter/targeting) and [UMP under-age treatment](https://developers.google.com/admob/flutter/privacy/gdpr) — check both settings, not just one.
Source inspection is sufficient to establish the local-storage behavior and the configured SDKs. It does not establish every server-side behavior, retention period or final account setting. Use this as a draft while completing the final device and Play Console checks in [Android release preparation](ANDROID_RELEASE.md).
+89
View File
@@ -0,0 +1,89 @@
# Google Play store listing
Title: **Mara’s Island Notebook**
Confirm the final name and trademark availability before creating the listing. The Android application ID remains `de.softwareapp_hb.lumen.daily`; confirm whether that ID has already been registered before creating a listing.
## Short description
Solve gentle logic puzzles and uncover an island's forgotten memories.
## Full description
A storm has scattered memories across the island. Open Mara’s notebook, follow the trail from Gran’s cottage to the lighthouse, and restore the pictures hidden in each puzzle.
Light the right cells using the clues beside each row and column. As the story unfolds, overlapping areas and special symbols introduce new ways to think. Take your time, explore the pages and return to unfinished patterns whenever you like.
- Read illustrated stories and uncover memories as you solve.
- Find a fresh daily puzzle and collect island postcards.
- Use undo and optional explained hints when you need a little help.
- Save your reading place and puzzle progress on your device.
The app includes optional rewarded ads for explained hints and occasional full-screen ads at natural breaks. Puzzles and reading remain available when no ad can be shown.
## Category and tags
Category: **Puzzle**. Suggested tags: logic puzzle, story, offline.
## Intended audience
Ages 13 and up: teens and adults. Intended Play Console bands: 13–15, 16–17 and 18 and over. Do not select the 9–12 band. This audience declaration is separate from the IARC content rating; assess applicable protections for minors and regional consent requirements before release. The app asks for a broad age group before advertising starts; Under 13 and Prefer not to say play without ads.
## Support
softwareapp.hb@gmail.com
Privacy policy: <https://gitea.softwareapp-hb.de/fishfacegit/logic-puzzle/src/branch/main/docs/PRIVACY_POLICY.md>
A standalone HTML copy is available at `docs/privacy-policy.html` for branded hosting. If it is published on another URL, use the same URL in the app build and Play Console.
## Release notes
Play Console accepts one “What's new” text per language, up to 500 characters. Use the matching language block below for the `2.0.3+12` release.
### English — What's new
```text
• New age setting: Under 13 and “Prefer not to say” play without ads; teens get a more protective ad experience. Change it any time in Settings.
• Added a privacy policy link in Settings.
• Updated the app name to Mara’s Island Notebook.
• New adaptive and round launcher icons on modern Android.
• Small stability and text-rendering improvements.
```
### German — What's new
```text
• Neue Alterseinstellung: Unter 13 und „Keine Angabe“ spielen ohne Werbung; für Teenager gelten strengere Werbeeinstellungen. Jederzeit in den Einstellungen änderbar.
• Datenschutzerklärung jetzt in den Einstellungen.
• Neuer App-Name: Mara’s Island Notebook.
• Neues adaptives und rundes App-Symbol auf modernen Android-Geräten.
• Kleinere Stabilitäts- und Textverbesserungen.
```
### Full changelog — 2.0.3+12
Player-facing:
- Added a first-launch age-group choice: Under 13, 13–17, 18 and over, or Prefer not to say.
- Under 13 and Prefer not to say play without advertising; no ad service, ad requests or consent form.
- 13–17 use child-directed ad treatment; 18 and over use standard treatment. Both keep the general-audience rating.
- The age group can be changed at any time in Settings.
- Added a Privacy policy link in Settings.
- Updated the Android and iOS display name to Mara's Island Notebook.
- Added adaptive and round Android launcher icons.
- Improved native font fallback for symbols and mathematical text.
Release engineering:
- Removed the hard production build blocker while retaining real AdMob ID and upload-signing checks.
- Added `scripts/build_android_release.sh` for guarded production AAB builds.
- Added Play Store assets in [`store/`](../store/README.md): icon, feature graphic, five phone screenshots and `app-ads.txt`.
- Added the Data safety worksheet and updated the release, listing and privacy documentation.
- Version bumped to 2.0.3 (build 12).
This is a release-readiness update; it does not add new stories or puzzles.
## Release review
Review the name, copy, screenshots, content rating, audience declarations and ad descriptions against the final build. Upload-ready assets are in [`store/`](../store/README.md). See [Android release preparation](ANDROID_RELEASE.md).
+83
View File
@@ -0,0 +1,83 @@
# Privacy policy for Mara’s Island Notebook
Last updated: 15 November 2026
This policy explains how information is handled by the Android app **Mara’s Island Notebook**, also known in development builds as **Lumen**. The production Android package is `de.softwareapp_hb.lumen.daily`.
The developer and person responsible for the processing described in this policy is **Hadrian Burkhardt**. For privacy questions or requests, contact **softwareapp.hb@gmail.com**.
## Playing the game
You do not need an account to play. The app stores your progress, puzzle marks, completed memories, postcards, bookmarks, reading position, daily streaks, language and sound settings, and the broad age-group choice described below on your device. These records let you continue where you left off.
The game does not operate an account service or upload these saved records to a developer-operated game server. Progress does not sync between devices. Story illustrations and recordings are bundled with the app. The app does not request access to your contacts, camera, microphone or precise device location.
## Local statistics
The app also stores local statistics, including session counts and dates, puzzle completions, advertising opportunities, ad impressions, earned rewards and advertising revenue estimates reported by the ad SDK. The game's local statistics do not include a developer-assigned device identifier and are not automatically uploaded to the developer.
Some development and testing versions have a report option that copies local statistics to your clipboard when you choose it. Copying a report does not send it to the developer. If you subsequently share a report, its recipient receives the information it contains. Avoid sending information that you do not want to share.
These local records remain until you clear the app's storage or uninstall it. There is no automatic expiry period for the local statistics.
## Advertising and Google services
The Android app integrates **Google AdMob** and Google's **User Messaging Platform (UMP)**. Ads support the game. The supported formats are optional rewarded ads for explained hints and full-screen ads at selected breaks in play or reading. Gameplay and reading remain available when an ad cannot be shown.
Advertising is a network service even though the game's saved progress stays on your device. Depending on the SDK settings and applicable restrictions, Google may receive an IP address, information about app or ad interactions, technical performance and diagnostic information, and device or account-related identifiers. An IP address can indicate an approximate location. This is different from requesting precise location permission.
Google uses advertising-service information to deliver and measure ads, maintain its services, and detect fraud and invalid activity. Google's [Mobile Ads SDK disclosure](https://developers.google.com/admob/android/privacy/play-data-disclosure) explains the SDK's data handling, including configuration-dependent restrictions. Google's own processing, retention and international transfers are also described in its [Privacy Policy](https://policies.google.com/privacy) and [advertising technology information](https://policies.google.com/technologies/ads).
The developer may receive aggregate advertising performance and revenue reports through AdMob. These reports are separate from your locally saved puzzle marks, bookmarks and reading position.
The app does not include a separate developer-operated analytics or crash-reporting upload service. This does not prevent Google's advertising SDK from processing its own diagnostics and interaction information.
## Age group and young players
Before any advertising starts, the app asks for a broad age group: **Under 13**, **13–17**, **18 and over**, or **Prefer not to say**. Only this choice is stored on your device. The app does not ask for or store a date of birth.
If you choose **Under 13** or **Prefer not to say**, advertising is turned off. The app does not start Google's advertising service, request ads, load rewarded or interstitial ads, or request advertising consent. Puzzles, stories, hints and reading breaks remain fully available. You can change the choice later in **Settings → Age group**.
If you choose **13–17**, ads are enabled with child-directed treatment and a general-audience content rating. The app also tells Google's consent tools that the user is under the age of consent where that applies. If you choose **18 and over**, ads use standard age treatment with the same general-audience content rating. Google's consent tools are applied before ads are requested.
These settings instruct Google's advertising service to apply protections for younger users, including restrictions on personalized advertising. They do not mean that advertising involves no data processing. Technical information may still be processed to deliver appropriate ads, secure the service and prevent fraud.
The game is intended for teenagers aged 13 and above and adults and is not directed at children under 13. The developer does not ask children to provide their name, address or other contact information to play. Parents or guardians can remove the game's local records using the deletion steps below. If you believe a child has sent personal information to the developer, please contact softwareapp.hb@gmail.com so the matter can be addressed.
## Privacy choices
Open **Settings → Privacy & advertising** to access Google's privacy options when those options are required and available. Availability depends on Google's consent status and the age treatment in effect. If advertising is off because **Under 13** or **Prefer not to say** was chosen, no ad privacy form is needed.
Where processing relies on your consent, you may withdraw it through the applicable privacy controls. Withdrawal does not affect processing that was lawful before withdrawal. Your Android device may also offer controls to reset or delete its advertising ID. Such controls do not remove every form of technical information used by advertising services.
You can play the bundled puzzles and stories without an internet connection. Advertising and online privacy forms require a connection.
## Contacting the developer
If you email the developer, the developer receives your email address, message and anything you choose to attach. This information is used to answer your request, provide support, investigate problems or handle privacy requests. Email providers process messages to deliver and store them.
Please send only information needed for your request. Do not send passwords, sensitive personal information or a child's personal details unless they are necessary to resolve the matter. Correspondence is kept for as long as needed to handle the request and any related follow-up, and longer where retention is necessary to meet a legal obligation or establish, exercise or defend legal claims.
## Reasons for processing and your rights
Where the EU or UK General Data Protection Regulation applies, the relevant basis depends on the processing: providing functionality you request, legitimate interests in responding to support requests and maintaining service security, consent where required for advertising or device storage, and compliance with legal obligations. Legitimate interests are subject to balancing against your rights and interests, particularly those of children. Child-directed ad settings do not replace any consent or parental authorization required by law.
Depending on your location and the circumstances, you may have rights to access, correct, delete or receive a portable copy of personal information, restrict processing, object to processing based on legitimate interests, or withdraw consent. Contact softwareapp.hb@gmail.com to exercise rights concerning information held by the developer. The developer may ask for information reasonably necessary to verify and handle a request.
The developer cannot remotely retrieve your locally saved game data or erase information held independently by Google. For Google's information, use the privacy controls and contact methods in Google's policy. You may also complain to your local data protection authority; in the EU, this can include the authority where you live, work or believe an infringement occurred.
## Deletion, retention and security
To delete locally saved game records, use **Android Settings → Apps → Mara’s Island Notebook → Storage → Clear storage** or uninstall the app. Some development versions appear under the name Lumen. Android menu wording varies by device. Clearing storage resets progress and settings. The app disables its Android cloud backup and device-transfer backup configuration.
Clearing the app's storage or uninstalling does not automatically delete emails you have sent, aggregate AdMob reports, or information already processed by Google. Contact the developer about support correspondence and use Google's privacy controls for information held by Google. The developer does not set Google's retention periods.
The app uses Android's app storage protections for local records. Google states that its Mobile Ads SDK encrypts transmitted data using TLS. No storage or transmission method can guarantee absolute security.
## Scope and changes
This policy covers the Android app. A browser playtest and the website hosting this document may have different storage or hosting practices; those services require their own applicable disclosures.
The developer will update this policy when relevant practices change and revise the date above. Material changes requiring additional notice or consent will be communicated before the new processing begins, as required by applicable law.
Privacy contact: **Hadrian Burkhardt — softwareapp.hb@gmail.com**.
+9
View File
@@ -0,0 +1,9 @@
# Privacy policy preparation
The policy text is in [PRIVACY_POLICY.md](PRIVACY_POLICY.md), with a standalone hosting copy in [privacy-policy.html](privacy-policy.html).
The policy describes the current Android implementation, including the local age-group choice, ad-free treatment for Under 13 and Prefer not to say, child-directed treatment for 13–17, standard treatment for 18 and over, and the absence of birth-date collection. Keep it aligned with the final AdMob account configuration and device verification. It does not establish that the app meets Families, consent or other release requirements.
Before hosting, review the stated handling of support correspondence, the actual AdMob account configuration and any ad partners, and applicable legal requirements. Hosting-provider identity, server logging and retention remain unknown; provide separate website disclosures if needed. No claim is made that this policy covers the Gitea host or browser playtest.
The publisher supplied the operator name Hadrian Burkhardt and contact softwareapp.hb@gmail.com. The app currently links to the public repository rendering of the policy; build with `--dart-define=PRIVACY_POLICY_URL=...` after publishing the standalone HTML, and enter the same URL in Play Console. The public HTML has no analytics, scripts or remotely loaded assets.
+5
View File
@@ -9,6 +9,11 @@
| [Project README](../README.md) | Features, artwork, narration, build and verification commands, publishing notes | | [Project README](../README.md) | Features, artwork, narration, build and verification commands, publishing notes |
| [Roadmap](../ROADMAP.md) | Product direction and the proposed 30–40-leaf campaign | | [Roadmap](../ROADMAP.md) | Product direction and the proposed 30–40-leaf campaign |
| [Task list](../TODO.md) | Actionable artwork and asset follow-ups not yet scheduled | | [Task list](../TODO.md) | Actionable artwork and asset follow-ups not yet scheduled |
| [Android release preparation](ANDROID_RELEASE.md) | Age flow, signing, AdMob, privacy URL, build command and submission checklist |
| [Play Store listing](PLAY_STORE_LISTING.md) | Title, descriptions, release notes, audience, support and privacy URL |
| [Data safety worksheet](GOOGLE_PLAY_DATA_SAFETY.md) | Working Play Console answers for SDK and local data |
| [Android privacy policy](PRIVACY_POLICY.md) | Public policy copy, with a standalone [HTML version](privacy-policy.html) |
| [Store assets](../store/README.md) | Upload-ready icon, feature graphic, screenshots and app-ads.txt |
| [Artwork provenance](../assets/artwork/README.md) | Prompts, sources and licensing for the bundled watercolours | | [Artwork provenance](../assets/artwork/README.md) | Prompts, sources and licensing for the bundled watercolours |
| [Narration provenance](../assets/narration/README.md) | Recording scripts, masters, checksums and licensing | | [Narration provenance](../assets/narration/README.md) | Recording scripts, masters, checksums and licensing |
+2
View File
@@ -18,6 +18,8 @@ Back returns to the collection or shelf from these activities.
## Ads at breaks ## Ads at breaks
The local age-group choice is applied before any of these opportunities. Under 13 and Prefer not to say receive no ads, so every break continues immediately. Players who choose 13–17 or 18 and over use the pacing below.
- Each completed outing has at most one automatic-ad opportunity, **after** the - Each completed outing has at most one automatic-ad opportunity, **after** the
player reads the postcard and selects “Keep this postcard”. Closing the player reads the postcard and selects “Keep this postcard”. Closing the
dialog with Back or tapping outside it does not start an ad. dialog with Back or tapping outside it does not start an ad.
+65
View File
@@ -0,0 +1,65 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Privacy policy for Mara’s Island Notebook, an Android story and puzzle game by Hadrian Burkhardt.">
<title>Privacy policy · Mara’s Island Notebook</title>
<style>
:root { color-scheme: light; }
body { margin: 0; background: #f6f1e7; color: #283e37; font: 17px/1.7 system-ui, sans-serif; }
main { max-width: 760px; margin: auto; padding: 48px 24px 72px; }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.2; }
h2 { font-size: 1.3rem; line-height: 1.35; margin-top: 2rem; }
p { margin: 1rem 0; }
a { color: #215d59; text-underline-offset: .15em; overflow-wrap: anywhere; }
a:focus-visible { outline: 3px solid #215d59; outline-offset: 3px; }
code { overflow-wrap: anywhere; }
@media print { body { background: white; color: black; } main { padding: 0; } }
</style>
</head>
<body><main>
<h1>Privacy policy for Mara’s Island Notebook</h1>
<p>Last updated: 15 November 2026</p>
<p>This policy explains how information is handled by the Android app <strong>Mara’s Island Notebook</strong>, also known in development builds as <strong>Lumen</strong>. The production Android package is <code>de.softwareapp_hb.lumen.daily</code>.</p>
<p>The developer and person responsible for the processing described in this policy is <strong>Hadrian Burkhardt</strong>. For privacy questions or requests, contact <strong><a href="mailto:softwareapp.hb@gmail.com">softwareapp.hb@gmail.com</a></strong>.</p>
<h2>Playing the game</h2>
<p>You do not need an account to play. The app stores your progress, puzzle marks, completed memories, postcards, bookmarks, reading position, daily streaks, language and sound settings, and the broad age-group choice described below on your device. These records let you continue where you left off.</p>
<p>The game does not operate an account service or upload these saved records to a developer-operated game server. Progress does not sync between devices. Story illustrations and recordings are bundled with the app. The app does not request access to your contacts, camera, microphone or precise device location.</p>
<h2>Local statistics</h2>
<p>The app also stores local statistics, including session counts and dates, puzzle completions, advertising opportunities, ad impressions, earned rewards and advertising revenue estimates reported by the ad SDK. The game&#x27;s local statistics do not include a developer-assigned device identifier and are not automatically uploaded to the developer.</p>
<p>Some development and testing versions have a report option that copies local statistics to your clipboard when you choose it. Copying a report does not send it to the developer. If you subsequently share a report, its recipient receives the information it contains. Avoid sending information that you do not want to share.</p>
<p>These local records remain until you clear the app&#x27;s storage or uninstall it. There is no automatic expiry period for the local statistics.</p>
<h2>Advertising and Google services</h2>
<p>The Android app integrates <strong>Google AdMob</strong> and Google&#x27;s <strong>User Messaging Platform (UMP)</strong>. Ads support the game. The supported formats are optional rewarded ads for explained hints and full-screen ads at selected breaks in play or reading. Gameplay and reading remain available when an ad cannot be shown.</p>
<p>Advertising is a network service even though the game&#x27;s saved progress stays on your device. Depending on the SDK settings and applicable restrictions, Google may receive an IP address, information about app or ad interactions, technical performance and diagnostic information, and device or account-related identifiers. An IP address can indicate an approximate location. This is different from requesting precise location permission.</p>
<p>Google uses advertising-service information to deliver and measure ads, maintain its services, and detect fraud and invalid activity. Google&#x27;s <a href="https://developers.google.com/admob/android/privacy/play-data-disclosure">Mobile Ads SDK disclosure</a> explains the SDK&#x27;s data handling, including configuration-dependent restrictions. Google&#x27;s own processing, retention and international transfers are also described in its <a href="https://policies.google.com/privacy">Privacy Policy</a> and <a href="https://policies.google.com/technologies/ads">advertising technology information</a>.</p>
<p>The developer may receive aggregate advertising performance and revenue reports through AdMob. These reports are separate from your locally saved puzzle marks, bookmarks and reading position.</p>
<p>The app does not include a separate developer-operated analytics or crash-reporting upload service. This does not prevent Google&#x27;s advertising SDK from processing its own diagnostics and interaction information.</p>
<h2>Age group and young players</h2>
<p>Before any advertising starts, the app asks for a broad age group: <strong>Under 13</strong>, <strong>13–17</strong>, <strong>18 and over</strong>, or <strong>Prefer not to say</strong>. Only this choice is stored on your device. The app does not ask for or store a date of birth.</p>
<p>If you choose <strong>Under 13</strong> or <strong>Prefer not to say</strong>, advertising is turned off. The app does not start Google&#x27;s advertising service, request ads, load rewarded or interstitial ads, or request advertising consent. Puzzles, stories, hints and reading breaks remain fully available. You can change the choice later in <strong>Settings → Age group</strong>.</p>
<p>If you choose <strong>13–17</strong>, ads are enabled with child-directed treatment and a general-audience content rating. The app also tells Google&#x27;s consent tools that the user is under the age of consent where that applies. If you choose <strong>18 and over</strong>, ads use standard age treatment with the same general-audience content rating. Google&#x27;s consent tools are applied before ads are requested.</p>
<p>These settings instruct Google&#x27;s advertising service to apply protections for younger users, including restrictions on personalized advertising. They do not mean that advertising involves no data processing. Technical information may still be processed to deliver appropriate ads, secure the service and prevent fraud.</p>
<p>The game is intended for teenagers aged 13 and above and adults and is not directed at children under 13. The developer does not ask children to provide their name, address or other contact information to play. Parents or guardians can remove the game&#x27;s local records using the deletion steps below. If you believe a child has sent personal information to the developer, please contact <a href="mailto:softwareapp.hb@gmail.com">softwareapp.hb@gmail.com</a> so the matter can be addressed.</p>
<h2>Privacy choices</h2>
<p>Open <strong>Settings → Privacy &amp; advertising</strong> to access Google&#x27;s privacy options when those options are required and available. Availability depends on Google&#x27;s consent status and the age treatment in effect. If advertising is off because <strong>Under 13</strong> or <strong>Prefer not to say</strong> was chosen, no ad privacy form is needed.</p>
<p>Where processing relies on your consent, you may withdraw it through the applicable privacy controls. Withdrawal does not affect processing that was lawful before withdrawal. Your Android device may also offer controls to reset or delete its advertising ID. Such controls do not remove every form of technical information used by advertising services.</p>
<p>You can play the bundled puzzles and stories without an internet connection. Advertising and online privacy forms require a connection.</p>
<h2>Contacting the developer</h2>
<p>If you email the developer, the developer receives your email address, message and anything you choose to attach. This information is used to answer your request, provide support, investigate problems or handle privacy requests. Email providers process messages to deliver and store them.</p>
<p>Please send only information needed for your request. Do not send passwords, sensitive personal information or a child&#x27;s personal details unless they are necessary to resolve the matter. Correspondence is kept for as long as needed to handle the request and any related follow-up, and longer where retention is necessary to meet a legal obligation or establish, exercise or defend legal claims.</p>
<h2>Reasons for processing and your rights</h2>
<p>Where the EU or UK General Data Protection Regulation applies, the relevant basis depends on the processing: providing functionality you request, legitimate interests in responding to support requests and maintaining service security, consent where required for advertising or device storage, and compliance with legal obligations. Legitimate interests are subject to balancing against your rights and interests, particularly those of children. Child-directed ad settings do not replace any consent or parental authorization required by law.</p>
<p>Depending on your location and the circumstances, you may have rights to access, correct, delete or receive a portable copy of personal information, restrict processing, object to processing based on legitimate interests, or withdraw consent. Contact <a href="mailto:softwareapp.hb@gmail.com">softwareapp.hb@gmail.com</a> to exercise rights concerning information held by the developer. The developer may ask for information reasonably necessary to verify and handle a request.</p>
<p>The developer cannot remotely retrieve your locally saved game data or erase information held independently by Google. For Google&#x27;s information, use the privacy controls and contact methods in Google&#x27;s policy. You may also complain to your local data protection authority; in the EU, this can include the authority where you live, work or believe an infringement occurred.</p>
<h2>Deletion, retention and security</h2>
<p>To delete locally saved game records, use <strong>Android Settings → Apps → Mara’s Island Notebook → Storage → Clear storage</strong> or uninstall the app. Some development versions appear under the name Lumen. Android menu wording varies by device. Clearing storage resets progress and settings. The app disables its Android cloud backup and device-transfer backup configuration.</p>
<p>Clearing the app&#x27;s storage or uninstalling does not automatically delete emails you have sent, aggregate AdMob reports, or information already processed by Google. Contact the developer about support correspondence and use Google&#x27;s privacy controls for information held by Google. The developer does not set Google&#x27;s retention periods.</p>
<p>The app uses Android&#x27;s app storage protections for local records. Google states that its Mobile Ads SDK encrypts transmitted data using TLS. No storage or transmission method can guarantee absolute security.</p>
<h2>Scope and changes</h2>
<p>This policy covers the Android app. A browser playtest and the website hosting this document may have different storage or hosting practices; those services require their own applicable disclosures.</p>
<p>The developer will update this policy when relevant practices change and revise the date above. Material changes requiring additional notice or consent will be communicated before the new processing begins, as required by applicable law.</p>
<p>Privacy contact: <strong>Hadrian Burkhardt — <a href="mailto:softwareapp.hb@gmail.com">softwareapp.hb@gmail.com</a></strong>.</p>
</main></body>
</html>
+2 -2
View File
@@ -7,7 +7,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>Lumen</string> <string>Mara’s Island Notebook</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
@@ -15,7 +15,7 @@
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>Lumen</string> <string>Mara's Notebook</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
+68 -70
View File
@@ -18,22 +18,35 @@ import 'services/translation.dart';
import 'domain/book.dart'; import 'domain/book.dart';
import 'domain/game.dart'; import 'domain/game.dart';
import 'domain/puzzle.dart';
import 'domain/postcards.dart'; import 'domain/postcards.dart';
import 'services/ad_pacing.dart'; import 'services/ad_pacing.dart';
import 'services/play_metrics.dart'; import 'services/play_metrics.dart';
import 'ui/postcards.dart'; import 'ui/postcards.dart';
import 'services/ads.dart'; import 'services/ads.dart';
import 'services/ad_audience.dart';
import 'ui/ad_age_group.dart';
import 'package:url_launcher/url_launcher.dart';
import 'services/ambience.dart'; import 'services/ambience.dart';
import 'services/narrator.dart'; import 'services/narrator.dart';
import 'services/progress.dart'; import 'services/progress.dart';
import 'ui/board.dart'; import 'ui/board.dart';
import 'ui/library.dart'; import 'ui/library.dart';
import 'ui/licenses.dart';
import 'ui/discovery.dart'; import 'ui/discovery.dart';
import 'ui/paper.dart'; import 'ui/paper.dart';
part 'ui/mara_story.dart'; part 'ui/mara_story.dart';
/// Override with `--dart-define=PRIVACY_POLICY_URL=...` for a branded host.
/// The repository page is publicly reachable and renders the policy as HTML.
const privacyPolicyUrl = String.fromEnvironment(
'PRIVACY_POLICY_URL',
defaultValue:
'https://gitea.softwareapp-hb.de/fishfacegit/logic-puzzle/src/branch/main/docs/PRIVACY_POLICY.md',
);
Future<void> main() async { Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
LicenseRegistry.addLicense(() async* { LicenseRegistry.addLicense(() async* {
@@ -160,9 +173,12 @@ class _LumenAppState extends State<LumenApp> {
child: child!, child: child!,
), ),
theme: ThemeData( theme: ThemeData(
fontFamilyFallback: kIsWeb fontFamilyFallback: const [
? const ['LumenText', 'LumenSymbols', 'LumenSymbols2', 'LumenMath'] 'LumenText',
: null, 'LumenSymbols',
'LumenSymbols2',
'LumenMath',
],
colorScheme: ColorScheme.fromSeed(seedColor: blue, surface: cream), colorScheme: ColorScheme.fromSeed(seedColor: blue, surface: cream),
scaffoldBackgroundColor: cream, scaffoldBackgroundColor: cream,
fontFamily: latin ? 'MaraHand' : null, fontFamily: latin ? 'MaraHand' : null,
@@ -239,12 +255,41 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
_route = route; _route = route;
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
unawaited(ads.start()); unawaited(startAdvertising());
_syncAtmosphere(); _syncAtmosphere();
if (mounted) _scheduleAutoplay(); if (mounted) _scheduleAutoplay();
}); });
} }
Future<void> startAdvertising() async {
if (!ads.supported) return;
if (!g.store.contains(AdAudience.storageKey)) {
await changeAdAgeGroup();
return;
}
await ads.setAudience(
AdAudience.fromStored(g.store.text(AdAudience.storageKey)),
);
}
Future<void> changeAdAgeGroup() async {
if (!ads.supported || !mounted) return;
final choice = await chooseAdAgeGroup(context);
if (!mounted || choice == null) return;
await g.store.set(AdAudience.storageKey, choice.name);
await ads.setAudience(choice);
}
Future<void> openPrivacyPolicy() async {
final uri = Uri.parse(privacyPolicyUrl);
try {
if (await launchUrl(uri, mode: LaunchMode.externalApplication)) return;
} catch (_) {}
if (mounted) {
await message('Privacy policy', uri.toString(), close: 'Close');
}
}
void _changed() { void _changed() {
if (!identical(narrator.tracks, g.book.tracks)) { if (!identical(narrator.tracks, g.book.tracks)) {
narrator.replaceTracks(g.book.tracks); narrator.replaceTracks(g.book.tracks);
@@ -835,42 +880,7 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
], ],
), ),
divider(), divider(),
folio('A SMALL DAILY RITUAL'),
action('Island postcards', g.showPostcards),
writing(
DateFormat(
'EEEE, d MMMM',
Localizations.localeOf(context).languageCode,
).format(DateTime.now()),
size: 27,
),
action(
'Play today’s puzzle →',
() => g.startDaily(DateTime.now()),
),
gap(),
folio('BY THE COTTAGE WINDOW'),
writing(
'A few spare pages for practice. For overlapping-area puzzles, follow the notebook’s story.',
size: 22,
color: muted,
),
action(
'Difficulty · ${g.difficulty.label} ▾',
chooseDifficulty,
),
action(
'Practice · ${g.difficulty.label} · Level ${g.practiceLevel}',
() => unawaited(g.startPractice()),
),
action('How to play', rules), action('How to play', rules),
action(
'Open-source licenses',
() => showLicensePage(
context: context,
applicationName: 'Lumen',
),
),
gap(), gap(),
writing( writing(
'Leave a light in the window.', 'Leave a light in the window.',
@@ -895,7 +905,10 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
('Language', chooseLanguage), ('Language', chooseLanguage),
('Sound & atmosphere', soundSettings), ('Sound & atmosphere', soundSettings),
('Recording speed', speed), ('Recording speed', speed),
('Privacy policy', openPrivacyPolicy),
('Privacy & advertising', privacy), ('Privacy & advertising', privacy),
if (ads.supported) ('Age group', changeAdAgeGroup),
('Open-source licenses', openSourceLicenses),
if (kDebugMode || appFlavor == 'qa' || appFlavor == 'check') if (kDebugMode || appFlavor == 'qa' || appFlavor == 'check')
('Playtest report', playtestReport), ('Playtest report', playtestReport),
]) ])
@@ -910,6 +923,10 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
), ),
); );
void openSourceLicenses() => Navigator.of(
context,
).push(MaterialPageRoute<void>(builder: (_) => const OpenSourceLicenses()));
Future<void> playtestReport() => showDialog<void>( Future<void> playtestReport() => showDialog<void>(
context: context, context: context,
builder: (c) => AlertDialog( builder: (c) => AlertDialog(
@@ -1921,40 +1938,18 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
); );
} }
Future<void> chooseDifficulty() async {
await showDialog<void>(
context: context,
builder: (c) => SimpleDialog(
title: CopyText('Classic practice pace', style: hand(29)),
children: [
for (final d in Difficulty.values)
SimpleDialogOption(
onPressed: () {
g.selectDifficulty(d);
Navigator.pop(c);
},
child: CopyText(
'${CopyScope.text(context, d.label)} — ${CopyScope.text(context, d.description)}',
style: hand(23),
),
),
],
),
);
}
void rules() { void rules() {
final text = CopyScope.text( final rulesText = CopyScope.text(
context, context,
'Light exactly as many cells as the number beside each row and above each column.\n\nTap to cycle: empty → light → crossed out → empty. Mark every cell to finish. Small dots mark fixed clues.\n\nA, B and C are overlapping areas with their own totals. Shared cells count in both areas. Compare clues and subtract their shared parts to find new deductions.\n\nEvery story grid reveals an object. Later pages require area comparisons; all are solvable without guessing. Classic practice grades the length of simpler row and column chains.\n\nWatch a rewarded ad for each explained hint. Hints are optional, and your puzzle remains available if no ad can be shown. Streaks count consecutive daily completions on this device.', 'Light the number of cells shown beside each row and above each column. Tap a cell to cycle through light, cross and empty. Mark every cell to finish; dotted cells are fixed clues.\n\nSome puzzles have overlapping areas with their own totals. A shared cell counts in every area it belongs to. Compare the totals to work out which cells to light.\n\nSpecial symbols add clues: matching stars have the same state; exactly one of a matching pair of lanterns is lit; and exactly two touching footprints are lit. Some totals are hidden: use the clue on the page to find them.\n\nStory puzzles reveal memories. Find a daily puzzle or explore island postcards from the bookshelf.',
); );
message( final hintText = CopyScope.text(
'Find the light', context,
kIsWeb kIsWeb
? '${text.substring(0, text.lastIndexOf('\n\n'))}\n\n${CopyScope.text(context, 'Hints are free in this browser playtest. Each hint reveals one cell and explains the deduction. Streaks count consecutive daily completions in this browser.')}' ? 'Hints are free in this browser playtest. Each hint reveals one cell and explains the deduction. Streaks count consecutive daily completions in this browser.'
: text, : 'Hints are optional. Watch a rewarded ad to reveal a cell and its explanation; your puzzle remains available if no ad can be shown. Streaks count consecutive daily completions on this device.',
close: 'Got it',
); );
message('Find the light', '$rulesText\n\n$hintText', close: 'Got it');
} }
Future<void> privacy() async { Future<void> privacy() async {
@@ -1967,9 +1962,12 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
return; return;
} }
if (!await ads.privacy()) { if (!await ads.privacy()) {
final adsOff = ads.supported && !ads.adsAllowed;
await message( await message(
'Privacy & advertising', 'Privacy & advertising',
'Game progress stays on this device. No account or game backend is used. Google advertising services may process device and ad interaction data when ads are available.\n\nNo advertising privacy options are currently required or available for your region.', adsOff
? 'Advertising is off because this device is set to Under 13 or Prefer not to say. No ads are requested. You can change the age group in Settings.\n\nGame progress stays on this device. No account or game backend is used.'
: 'Game progress stays on this device. No account or game backend is used. Google advertising services may process device and ad interaction data when ads are available.\n\nNo advertising privacy options are currently required or available for your region.',
close: 'Close', close: 'Close',
); );
} }
+23
View File
@@ -0,0 +1,23 @@
/// Broad age groups used only to choose advertising settings.
///
/// Only this choice is stored locally; no birth date is collected. Players who
/// choose [under13] or [unknown] play without advertising, and the ad SDK is
/// never initialized for them.
enum AdAudience {
unknown,
under13,
teen,
adult;
/// The only age information the app persists.
static const storageKey = 'ad_age_group_v1';
bool get allowsAds => this == teen || this == adult;
/// Teens, under-13s and unknown-age players never receive standard adult
/// advertising treatment.
bool get restricted => this != adult;
static AdAudience fromStored(String value) =>
values.where((group) => group.name == value).firstOrNull ?? unknown;
}
+82 -14
View File
@@ -4,6 +4,7 @@ import 'package:flutter/foundation.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'ad_pacing.dart'; import 'ad_pacing.dart';
import 'ad_audience.dart';
import 'play_metrics.dart'; import 'play_metrics.dart';
class Ads { class Ads {
@@ -13,6 +14,26 @@ class Ads {
final PlayMetrics? metrics; final PlayMetrics? metrics;
bool _showing = false; bool _showing = false;
bool foreground = true; bool foreground = true;
AdAudience _audience = AdAudience.unknown;
bool _consentReady = false;
int _generation = 0;
AdAudience get audience => _audience;
bool get adsAllowed => supported && _audience.allowsAds;
Future<void> setAudience(AdAudience audience) async {
_audience = audience;
await start();
}
void _clearAds() {
_reward?.dispose();
_interstitial?.dispose();
_reward = null;
_interstitial = null;
_rewardAt = _interstitialAt = null;
_rewardLoading = _interstitialLoading = false;
}
void _paid(AdWithoutView ad, String format) { void _paid(AdWithoutView ad, String format) {
ad.onPaidEvent = (ad, value, precision, currency) { ad.onPaidEvent = (ad, value, precision, currency) {
@@ -42,33 +63,61 @@ class Ads {
(defaultTargetPlatform == TargetPlatform.android || (defaultTargetPlatform == TargetPlatform.android ||
defaultTargetPlatform == TargetPlatform.iOS); defaultTargetPlatform == TargetPlatform.iOS);
Future<void> start() async { Future<void> start() async {
if (!supported) return; final generation = ++_generation;
_consentReady = false;
_clearAds();
// Under-13 and unknown-age players never initialize the SDK or request ads.
if (!supported || _disposed || !_audience.allowsAds) return;
// Teenagers receive child-directed treatment; adults receive standard
// treatment. Both keep the general-audience rating.
await MobileAds.instance.updateRequestConfiguration(
RequestConfiguration(
ageRestrictedTreatment: _audience.restricted
? AgeRestrictedTreatment.child
: AgeRestrictedTreatment.unspecified,
maxAdContentRating: MaxAdContentRating.g,
),
);
if (_disposed || generation != _generation) return;
ConsentInformation.instance.requestConsentInfoUpdate( ConsentInformation.instance.requestConsentInfoUpdate(
ConsentRequestParameters(), ConsentRequestParameters(tagForUnderAgeOfConsent: _audience.restricted),
() { () {
ConsentForm.loadAndShowConsentFormIfRequired((_) => _initialize()); if (_disposed || generation != _generation) return;
ConsentForm.loadAndShowConsentFormIfRequired(
(_) => _initialize(generation),
);
}, },
(_) => _initialize(), (_) => _initialize(generation),
); );
} }
Future<void> _initialize() async { Future<void> _initialize(int generation) async {
if (_disposed || if (_disposed ||
_started || generation != _generation ||
!_audience.allowsAds ||
!await ConsentInformation.instance.canRequestAds()) { !await ConsentInformation.instance.canRequestAds()) {
return; return;
} }
_started = true; if (_disposed || generation != _generation) return;
await MobileAds.instance.initialize(); if (!_started) {
_started = true;
await MobileAds.instance.initialize();
}
if (_disposed || generation != _generation) return;
_consentReady = true;
await _load(); await _load();
} }
Future<void> _load() async { Future<void> _load() async {
if (_disposed || if (_disposed ||
!_consentReady ||
!_audience.allowsAds ||
!supported || !supported ||
!await ConsentInformation.instance.canRequestAds()) { !await ConsentInformation.instance.canRequestAds()) {
return; return;
} }
final generation = _generation;
if (_disposed || !_consentReady) return;
final ios = defaultTargetPlatform == TargetPlatform.iOS; final ios = defaultTargetPlatform == TargetPlatform.iOS;
if (_reward == null && !_rewardLoading) { if (_reward == null && !_rewardLoading) {
_rewardLoading = true; _rewardLoading = true;
@@ -81,8 +130,12 @@ class Ads {
request: const AdRequest(), request: const AdRequest(),
rewardedAdLoadCallback: RewardedAdLoadCallback( rewardedAdLoadCallback: RewardedAdLoadCallback(
onAdLoaded: (a) { onAdLoaded: (a) {
if (generation != _generation) {
a.dispose();
return;
}
_rewardLoading = false; _rewardLoading = false;
if (_disposed) { if (_disposed || !_consentReady) {
a.dispose(); a.dispose();
return; return;
} }
@@ -91,6 +144,7 @@ class Ads {
_rewardAt = DateTime.now(); _rewardAt = DateTime.now();
}, },
onAdFailedToLoad: (_) { onAdFailedToLoad: (_) {
if (generation != _generation) return;
_rewardLoading = false; _rewardLoading = false;
}, },
), ),
@@ -108,8 +162,12 @@ class Ads {
request: const AdRequest(), request: const AdRequest(),
adLoadCallback: InterstitialAdLoadCallback( adLoadCallback: InterstitialAdLoadCallback(
onAdLoaded: (a) { onAdLoaded: (a) {
if (generation != _generation) {
a.dispose();
return;
}
_interstitialLoading = false; _interstitialLoading = false;
if (_disposed) { if (_disposed || !_consentReady) {
a.dispose(); a.dispose();
return; return;
} }
@@ -118,6 +176,7 @@ class Ads {
_interstitialAt = DateTime.now(); _interstitialAt = DateTime.now();
}, },
onAdFailedToLoad: (_) { onAdFailedToLoad: (_) {
if (generation != _generation) return;
_interstitialLoading = false; _interstitialLoading = false;
}, },
), ),
@@ -127,6 +186,8 @@ class Ads {
Future<bool> hint(VoidCallback earned) async { Future<bool> hint(VoidCallback earned) async {
if (!supported || if (!supported ||
!_consentReady ||
!_audience.allowsAds ||
_disposed || _disposed ||
_showing || _showing ||
!foreground || !foreground ||
@@ -181,6 +242,8 @@ class Ads {
Future<void> between(VoidCallback next) async { Future<void> between(VoidCallback next) async {
if (!supported || if (!supported ||
!_consentReady ||
!_audience.allowsAds ||
_disposed || _disposed ||
_showing || _showing ||
!foreground || !foreground ||
@@ -230,19 +293,24 @@ class Ads {
} }
Future<bool> privacy() async { Future<bool> privacy() async {
if (!supported) return false; // No ads means no ad-privacy form and no reason to touch the SDK.
if (!supported || !_audience.allowsAds) return false;
if (await ConsentInformation.instance if (await ConsentInformation.instance
.getPrivacyOptionsRequirementStatus() != .getPrivacyOptionsRequirementStatus() !=
PrivacyOptionsRequirementStatus.required) { PrivacyOptionsRequirementStatus.required) {
return false; return false;
} }
ConsentForm.showPrivacyOptionsForm((_) {}); final generation = ++_generation;
_consentReady = false;
_clearAds();
ConsentForm.showPrivacyOptionsForm((_) => _initialize(generation));
return true; return true;
} }
void dispose() { void dispose() {
_disposed = true; _disposed = true;
_reward?.dispose(); _generation++;
_interstitial?.dispose(); _consentReady = false;
_clearAds();
} }
} }
+33
View File
@@ -0,0 +1,33 @@
import 'package:flutter/material.dart';
import '../services/ad_audience.dart';
import 'translation.dart';
Future<AdAudience?> chooseAdAgeGroup(BuildContext context) =>
showDialog<AdAudience>(
context: context,
builder: (context) => SimpleDialog(
title: const CopyText('Choose your age group'),
children: [
const Padding(
padding: EdgeInsets.fromLTRB(24, 0, 24, 16),
child: CopyText(
'We use this only to choose advertising settings. Under 13 and Prefer not to say play without ads. Your choice stays on this device.',
),
),
for (final option in const [
(AdAudience.under13, 'Under 13'),
(AdAudience.teen, '13–17'),
(AdAudience.adult, '18 and over'),
(AdAudience.unknown, 'Prefer not to say'),
])
SimpleDialogOption(
onPressed: () => Navigator.pop(context, option.$1),
child: CopyText(
option.$2,
style: const TextStyle(fontFamily: 'LumenText', fontSize: 18),
),
),
],
),
);
+90 -54
View File
@@ -139,66 +139,102 @@ class LibraryBookCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
// A cloth-bound cover with a recessed illustrated panel. The if (story.id == 'mara-island' && story.coverAsset != null)
// artwork keeps its natural proportions inside each book. Center(
Container( child: AspectRatio(
height: 276, aspectRatio: 1.5,
padding: const EdgeInsets.fromLTRB(22, 20, 14, 20), child: Stack(
decoration: BoxDecoration( fit: StackFit.expand,
gradient: LinearGradient( children: [
colors: [cloth, Color.lerp(cloth, Colors.black, .2)!], Image.asset(
begin: Alignment.topLeft, artworkAsset(story.coverAsset!),
end: Alignment.bottomRight, fit: BoxFit.contain,
), excludeFromSemantics: true,
boxShadow: [ errorBuilder: (_, _, _) =>
BoxShadow( Icon(Icons.menu_book, size: 64, color: light),
color: cloth.withValues(alpha: .22), ),
offset: const Offset(0, 10), Center(
blurRadius: 16, child: FractionallySizedBox(
spreadRadius: -5, widthFactor: .49,
), child: ExcludeSemantics(
], child: FittedBox(
border: Border( fit: BoxFit.scaleDown,
left: BorderSide( child: CopyText(
color: Color.lerp(cloth, Colors.black, .35)!, 'Mara’s\nisland notebook',
width: 7, textAlign: TextAlign.center,
), style: const TextStyle(
right: BorderSide(color: light, width: 3), fontFamily: 'MaraHand',
), fontSize: 28,
), color: Color(0xff5e5140),
child: Container( ),
padding: const EdgeInsets.all(14),
decoration: BoxDecoration(
border: Border.all(color: light.withValues(alpha: .4)),
),
child: Column(
children: [
Icon(
Icons.auto_awesome_outlined,
size: 18,
color: light,
),
const SizedBox(height: 12),
Expanded(
child: story.coverAsset == null
? Icon(Icons.menu_book, size: 64, color: light)
: Image.asset(
artworkAsset(story.coverAsset!),
fit: BoxFit.contain,
excludeFromSemantics: true,
errorBuilder: (_, _, _) => Icon(
Icons.menu_book,
size: 64,
color: light,
), ),
), ),
),
),
),
],
),
),
)
else
Container(
height: 276,
padding: const EdgeInsets.fromLTRB(22, 20, 14, 20),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [cloth, Color.lerp(cloth, Colors.black, .2)!],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
boxShadow: [
BoxShadow(
color: cloth.withValues(alpha: .22),
offset: const Offset(0, 10),
blurRadius: 16,
spreadRadius: -5,
), ),
const SizedBox(height: 12),
SizedBox(width: 38, child: Divider(color: light)),
], ],
border: Border(
left: BorderSide(
color: Color.lerp(cloth, Colors.black, .35)!,
width: 7,
),
right: BorderSide(color: light, width: 3),
),
),
child: Container(
padding: const EdgeInsets.all(14),
decoration: BoxDecoration(
border: Border.all(color: light.withValues(alpha: .4)),
),
child: Column(
children: [
Icon(
Icons.auto_awesome_outlined,
size: 18,
color: light,
),
const SizedBox(height: 12),
Expanded(
child: story.coverAsset == null
? Icon(Icons.menu_book, size: 64, color: light)
: Image.asset(
artworkAsset(story.coverAsset!),
fit: BoxFit.contain,
excludeFromSemantics: true,
errorBuilder: (_, _, _) => Icon(
Icons.menu_book,
size: 64,
color: light,
),
),
),
const SizedBox(height: 12),
SizedBox(width: 38, child: Divider(color: light)),
],
),
), ),
), ),
),
const SizedBox(height: 24), const SizedBox(height: 24),
CopyText(story.title, style: _type(25, serif: true)), CopyText(story.title, style: _type(25, serif: true)),
const SizedBox(height: 10), const SizedBox(height: 10),
+71
View File
@@ -0,0 +1,71 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'translation.dart';
/// Group all distinct notices by component, removing exact duplicates.
Future<Map<String, Set<String>>> collectLicenseNotices(
Stream<LicenseEntry> entries,
) async {
final notices = <String, Set<String>>{};
await for (final entry in entries) {
final text = entry.paragraphs.map((p) => p.text).join('\n\n').trim();
if (text.isEmpty) continue;
for (final package in entry.packages.toSet()) {
notices.putIfAbsent(package, () => <String>{}).add(text);
}
}
return notices;
}
class OpenSourceLicenses extends StatefulWidget {
const OpenSourceLicenses({super.key});
@override
State<OpenSourceLicenses> createState() => _OpenSourceLicensesState();
}
class _OpenSourceLicensesState extends State<OpenSourceLicenses> {
late final notices = collectLicenseNotices(LicenseRegistry.licenses);
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(title: const CopyText('Open-source licenses')),
body: FutureBuilder<Map<String, Set<String>>>(
future: notices,
builder: (context, snapshot) {
if (snapshot.hasError) {
return const Center(child: CopyText('Licenses could not be loaded.'));
}
if (!snapshot.hasData) {
return const Center(child: CircularProgressIndicator());
}
final entries = snapshot.data!.entries.toList()
..sort((a, b) => a.key.toLowerCase().compareTo(b.key.toLowerCase()));
return ListView(
padding: const EdgeInsets.all(20),
children: [
const CopyText(
'Lumen uses open-source software and fonts. Choose a component to read its notices.',
),
const SizedBox(height: 16),
for (final entry in entries)
Card(
child: ExpansionTile(
title: Text(entry.key),
subtitle: const CopyText('View license notice'),
children: [
for (final notice in entry.value)
Padding(
padding: const EdgeInsets.all(16),
child: SelectableText(notice),
),
],
),
),
],
);
},
),
);
}
+6 -4
View File
@@ -3,7 +3,6 @@ import '../services/browser_assets.dart';
import 'dart:math' as math; import 'dart:math' as math;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'translation.dart'; import 'translation.dart';
@@ -16,9 +15,12 @@ const ink = Color(0xff36413c),
amber = Color(0xffe0b568); amber = Color(0xffe0b568);
TextStyle hand(double size, {Color color = ink}) => TextStyle( TextStyle hand(double size, {Color color = ink}) => TextStyle(
fontFamily: 'MaraHand', fontFamily: 'MaraHand',
fontFamilyFallback: kIsWeb fontFamilyFallback: const [
? const ['LumenText', 'LumenSymbols', 'LumenSymbols2', 'LumenMath'] 'LumenText',
: null, 'LumenSymbols',
'LumenSymbols2',
'LumenMath',
],
fontSize: size, fontSize: size,
height: 1.30, height: 1.30,
color: color, color: color,
+40 -18
View File
@@ -98,27 +98,49 @@ class ShelfActivities extends StatelessWidget {
style: const TextStyle(fontFamily: 'sans-serif', fontSize: 15), style: const TextStyle(fontFamily: 'sans-serif', fontSize: 15),
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
Wrap( SizedBox(
spacing: 12, width: double.infinity,
runSpacing: 8, child: FilledButton.icon(
children: [ key: const ValueKey('shelf-daily'),
FilledButton.icon( onPressed: () => game.startDaily(DateTime.now()),
key: const ValueKey('shelf-daily'), style: FilledButton.styleFrom(
onPressed: () => game.startDaily(DateTime.now()), minimumSize: const Size(0, 64),
icon: Icon( padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
game.todaySolved ? Icons.check : Icons.wb_sunny_outlined, ),
), icon: Icon(
label: CopyText( game.todaySolved ? Icons.check : Icons.wb_sunny_outlined,
game.todaySolved ? 'Revisit today’s puzzle' : 'Today’s puzzle', size: 24,
),
label: CopyText(
game.todaySolved ? 'Revisit today’s puzzle' : 'Today’s puzzle',
style: const TextStyle(
fontFamily: 'sans-serif',
fontSize: 20,
fontWeight: FontWeight.w600,
), ),
), ),
OutlinedButton.icon( ),
key: const ValueKey('shelf-postcards'), ),
onPressed: onPostcards, const SizedBox(height: 12),
icon: const Icon(Icons.local_post_office_outlined), SizedBox(
label: const CopyText('Island postcards'), width: double.infinity,
child: OutlinedButton.icon(
key: const ValueKey('shelf-postcards'),
onPressed: onPostcards,
style: OutlinedButton.styleFrom(
minimumSize: const Size(0, 64),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
), ),
], icon: const Icon(Icons.local_post_office_outlined, size: 24),
label: const CopyText(
'Island postcards',
style: TextStyle(
fontFamily: 'sans-serif',
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
CopyText( CopyText(
+64
View File
@@ -529,6 +529,70 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.12" version: "0.7.12"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: e8cc955c97e06df9879140a1fe301f3d493f01b7c62dec7f46834be31d7e9fda
url: "https://pub.dev"
source: hosted
version: "6.3.3"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "611e87fb320b70d1dd721dc46af89c98aceccea9b31fde49e084591414e0c610"
url: "https://pub.dev"
source: hosted
version: "6.3.33"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "8faa1aab294f1ab4040b43660c887b0418d5fa4f0cffef76a484e6aa1092eb4a"
url: "https://pub.dev"
source: hosted
version: "6.4.2"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: "10f86fef4c2c43563fa6c211ff9cf757adf4d3ab762c56bd430664a947d70cd0"
url: "https://pub.dev"
source: hosted
version: "3.2.3"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: "5e835a3b869c2d70325349c81c5a45c28e20791265b67b2669da6b08c5cd5201"
url: "https://pub.dev"
source: hosted
version: "3.2.6"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "85c81589622fbc87c1c683aaea164d3604a7777495a79d91e39ffcdec39ddb34"
url: "https://pub.dev"
source: hosted
version: "2.4.3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "6c5ad3f22cd4c38e089b81963b3cd7bb83b111b2df5dce008bb066162f42e429"
url: "https://pub.dev"
source: hosted
version: "3.1.6"
uuid: uuid:
dependency: transitive dependency: transitive
description: description:
+2 -1
View File
@@ -1,7 +1,7 @@
name: lumen name: lumen
description: Mara's island notebook — an offline illustrated logic puzzle. description: Mara's island notebook — an offline illustrated logic puzzle.
publish_to: none publish_to: none
version: 2.0.2+11 version: 2.0.3+12
environment: environment:
sdk: '>=3.13.0 <4.0.0' sdk: '>=3.13.0 <4.0.0'
dependencies: dependencies:
@@ -11,6 +11,7 @@ dependencies:
sdk: flutter sdk: flutter
shared_preferences: ^2.5.6 shared_preferences: ^2.5.6
google_mobile_ads: ^9.2.0 google_mobile_ads: ^9.2.0
url_launcher: ^6.3.2
just_audio: ^0.10.6 just_audio: ^0.10.6
audio_session: ^0.2.2 audio_session: ^0.2.2
intl: ^0.20.3 intl: ^0.20.3
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
# Build the Play upload bundle with production AdMob IDs and upload signing.
#
# Required environment:
# ADMOB_APP_ID ca-app-pub-...~...
# ADMOB_REWARDED_ID ca-app-pub-.../...
# ADMOB_INTERSTITIAL_ID ca-app-pub-.../...
# LUMEN_UPLOAD_PROPERTIES absolute path to the private signing properties file
#
# Optional:
# PRIVACY_POLICY_URL public policy URL used by Settings → Privacy policy
set -euo pipefail
: "${ADMOB_APP_ID:?Set ADMOB_APP_ID to the AdMob Android application ID}"
: "${ADMOB_REWARDED_ID:?Set ADMOB_REWARDED_ID to the rewarded ad unit ID}"
: "${ADMOB_INTERSTITIAL_ID:?Set ADMOB_INTERSTITIAL_ID to the interstitial ad unit ID}"
: "${LUMEN_UPLOAD_PROPERTIES:?Set LUMEN_UPLOAD_PROPERTIES to the signing properties file}"
case "$ADMOB_APP_ID" in
ca-app-pub-3940256099942544~*) echo "Refusing Google's sample AdMob app ID." >&2; exit 1 ;;
esac
case "$ADMOB_REWARDED_ID" in
ca-app-pub-3940256099942544/*) echo "Refusing Google's sample rewarded ad unit." >&2; exit 1 ;;
esac
case "$ADMOB_INTERSTITIAL_ID" in
ca-app-pub-3940256099942544/*) echo "Refusing Google's sample interstitial ad unit." >&2; exit 1 ;;
esac
[ -f "$LUMEN_UPLOAD_PROPERTIES" ] || { echo "Signing properties file not found." >&2; exit 1; }
export ORG_GRADLE_PROJECT_ADMOB_APP_ID="$ADMOB_APP_ID"
export LUMEN_UPLOAD_PROPERTIES
policy_url="${PRIVACY_POLICY_URL:-https://gitea.softwareapp-hb.de/fishfacegit/logic-puzzle/src/branch/main/docs/PRIVACY_POLICY.md}"
cd "$(dirname "$0")/.."
flutter build appbundle --release --flavor prod \
--dart-define=ADMOB_REWARDED_ID="$ADMOB_REWARDED_ID" \
--dart-define=ADMOB_INTERSTITIAL_ID="$ADMOB_INTERSTITIAL_ID" \
--dart-define=PRIVACY_POLICY_URL="$policy_url"
echo "Built build/app/outputs/bundle/prodRelease/app-prod-release.aab"
+1 -1
View File
@@ -2,7 +2,7 @@
"""Read-only game-progress smoke check of the installed Flutter app; no fixtures/reset.""" """Read-only game-progress smoke check of the installed Flutter app; no fixtures/reset."""
import argparse,re,subprocess,time,xml.etree.ElementTree as ET import argparse,re,subprocess,time,xml.etree.ElementTree as ET
from pathlib import Path from pathlib import Path
p=argparse.ArgumentParser();p.add_argument('--serial',required=True);p.add_argument('--package',default='com.lumen.daily');p.add_argument('--expect-fresh',action='store_true');a=p.parse_args() p=argparse.ArgumentParser();p.add_argument('--serial',required=True);p.add_argument('--package',default='de.softwareapp_hb.lumen.daily');p.add_argument('--expect-fresh',action='store_true');a=p.parse_args()
assert re.fullmatch(r'[a-zA-Z0-9_.]+',a.package) assert re.fullmatch(r'[a-zA-Z0-9_.]+',a.package)
base=['/home/ubuntu/Android/Sdk/platform-tools/adb','-s',a.serial];out=Path('artifacts/flutter-check');out.mkdir(parents=True,exist_ok=True) base=['/home/ubuntu/Android/Sdk/platform-tools/adb','-s',a.serial];out=Path('artifacts/flutter-check');out.mkdir(parents=True,exist_ok=True)
def adb(*args):return subprocess.check_output(base+list(args)) def adb(*args):return subprocess.check_output(base+list(args))
+54
View File
@@ -0,0 +1,54 @@
# Google Play submission assets
The image assets in this folder are ready to upload through Play Console. Files
are tracked so the store package survives a clean checkout; `artifacts/` is
ignored. Listing copy lives in
[`docs/PLAY_STORE_LISTING.md`](../docs/PLAY_STORE_LISTING.md).
| File | Play Console use | Specification |
| --- | --- | --- |
| `app-icon-512.png` | App icon | 512 × 512, 32-bit RGBA PNG (fully opaque), no rounded corners or shadow |
| `feature-graphic-1024x500.png` | Feature graphic | 1024 × 500 RGB PNG |
| `phone/01-notebook.png` … `05-bookshelf.png` | Phone screenshots | 1080 × 1920 RGB PNG, 3× captures of the real Flutter UI |
Suggested screenshot order: logic puzzle, story, notebook, postcards, bookshelf.
The captures show the notebook home, a cottage story page, a partly solved
7×7 logic puzzle, the island-postcard collection and the bookshelf. They were
produced by `tool/capture_play_store_test.dart` at a 360 × 640 logical viewport
and 3× output resolution, with advertising disabled and local test data only.
The in-app cover and heading retain the Lumen name while the store title uses
Mara’s Island Notebook; both refer to the same app.
Regenerate the screenshots after a visible UI or title change:
```sh
flutter test tool/capture_play_store_test.dart
cp artifacts/play-store/phone/*.png store/phone/
```
The launcher uses the same lighthouse mark. Android adaptive-icon resources live
in `android/app/src/main/res/mipmap-anydpi-v26/`; legacy density PNGs and round
icons are generated from `app-icon-512.png`.
## app-ads.txt
AdMob requires the exact publisher line at the domain root of the developer
website:
```text
google.com, pub-3909261635234286, DIRECT, f08c47fec0942fa0
```
The live copy is <https://softwareapp-hb.de/app-ads.txt>. Keep it identical to
the line AdMob shows for the account and do not place it under a subdirectory.
The website source that publishes it is the separate `softwareapp_website`
project.
## Requirements
Checked against Google's preview-asset guidance:
<https://support.google.com/googleplay/android-developer/answer/9866151>
Upload the individual files; the ZIP in `artifacts/` is only a convenience
download and is not a Play Console import format.
+1
View File
@@ -0,0 +1 @@
google.com, pub-3909261635234286, DIRECT, f08c47fec0942fa0
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

+104
View File
@@ -0,0 +1,104 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:lumen/domain/book.dart';
import 'package:lumen/domain/game.dart';
import 'package:lumen/main.dart';
import 'package:lumen/services/ad_audience.dart';
import 'package:lumen/services/ads.dart';
import 'package:lumen/services/progress.dart';
import 'package:lumen/ui/ad_age_group.dart';
/// A supported platform with no consent or SDK initialization.
class _StandaloneAds extends Ads {
_StandaloneAds() : super(enabled: true);
@override
bool get supported => true;
}
void main() {
test('only teens and adults enable advertising', () {
expect(AdAudience.teen.allowsAds, isTrue);
expect(AdAudience.adult.allowsAds, isTrue);
expect(AdAudience.under13.allowsAds, isFalse);
expect(AdAudience.unknown.allowsAds, isFalse);
});
test('every non-adult group gets restricted treatment', () {
expect(AdAudience.unknown.restricted, isTrue);
expect(AdAudience.under13.restricted, isTrue);
expect(AdAudience.teen.restricted, isTrue);
expect(AdAudience.adult.restricted, isFalse);
});
test('unknown or malformed stored values fail closed', () {
expect(AdAudience.fromStored('teen'), AdAudience.teen);
expect(AdAudience.fromStored('adult'), AdAudience.adult);
expect(AdAudience.fromStored('under13'), AdAudience.under13);
expect(AdAudience.fromStored('unknown'), AdAudience.unknown);
expect(AdAudience.fromStored(''), AdAudience.unknown);
expect(AdAudience.fromStored('birth-date'), AdAudience.unknown);
});
test('players without ads never request or open an ad', () async {
final ads = _StandaloneAds();
await ads.setAudience(AdAudience.under13);
expect(ads.adsAllowed, isFalse);
expect(await ads.hint(() {}), isFalse);
var continued = false;
await ads.between(() => continued = true);
expect(continued, isTrue);
expect(await ads.privacy(), isFalse);
ads.dispose();
});
testWidgets('the age screen returns each option', (tester) async {
AdAudience? chosen;
await tester.pumpWidget(
MaterialApp(
home: Builder(
builder: (context) => TextButton(
onPressed: () async {
chosen = await chooseAdAgeGroup(context);
},
child: const Text('open'),
),
),
),
);
for (final option in const {
'Under 13': AdAudience.under13,
'13–17': AdAudience.teen,
'18 and over': AdAudience.adult,
'Prefer not to say': AdAudience.unknown,
}.entries) {
chosen = null;
await tester.tap(find.text('open'));
await tester.pumpAndSettle();
expect(find.text('Choose your age group'), findsOneWidget);
await tester.tap(find.text(option.key));
await tester.pumpAndSettle();
expect(chosen, option.value);
}
});
testWidgets('first launch stores the age choice before ads start', (
tester,
) async {
final book = (await tester.runAsync(Book.load))!;
final game = Game(book, Progress.memory());
final ads = _StandaloneAds();
await tester.pumpWidget(
MaterialApp(
home: Notebook(game: game, adsEnabled: true, ads: ads),
),
);
await tester.pumpAndSettle();
expect(find.text('Choose your age group'), findsOneWidget);
await tester.tap(find.text('Under 13'));
await tester.pumpAndSettle();
expect(game.store.text(AdAudience.storageKey), 'under13');
expect(ads.audience, AdAudience.under13);
expect(ads.adsAllowed, isFalse);
await tester.pumpWidget(const SizedBox());
});
}
+18
View File
@@ -0,0 +1,18 @@
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:lumen/ui/licenses.dart';
void main() {
test('each component keeps distinct notices without duplicates', () async {
final notices = await collectLicenseNotices(
Stream.fromIterable([
LicenseEntryWithLineBreaks(['First', 'Second'], 'Shared notice'),
LicenseEntryWithLineBreaks(['First'], 'Shared notice'),
LicenseEntryWithLineBreaks(['First'], 'Different notice'),
]),
);
expect(notices.length, 2);
expect(notices['First'], {'Shared notice', 'Different notice'});
expect(notices['Second'], {'Shared notice'});
});
}
+93 -42
View File
@@ -13,6 +13,7 @@ import 'package:lumen/main.dart';
import 'package:lumen/services/ads.dart'; import 'package:lumen/services/ads.dart';
import 'package:lumen/services/progress.dart'; import 'package:lumen/services/progress.dart';
import 'package:lumen/ui/postcards.dart'; import 'package:lumen/ui/postcards.dart';
import 'package:lumen/ui/licenses.dart';
import 'postcards_test.dart' show solve; import 'postcards_test.dart' show solve;
@@ -268,48 +269,98 @@ void main() {
}, },
); );
testWidgets( testWidgets('shelf activity buttons remain large on a small screen', (
'shelf daily play preserves the book leaf and returns to the shelf', tester,
(tester) async { ) async {
tester.view.physicalSize = const Size(600, 960); tester.view.physicalSize = const Size(320, 700);
tester.view.devicePixelRatio = 1; tester.view.devicePixelRatio = 1;
addTearDown(tester.view.reset); addTearDown(tester.view.reset);
final library = (await tester.runAsync(StoryLibrary.load))!; final book = (await tester.runAsync(Book.load))!;
await tester.runAsync(() async { final game = Game(book, Progress.memory());
for (final story in library.stories) { await tester.pumpWidget(
await library.open(story.id); MaterialApp(
} home: MediaQuery(
}); data: const MediaQueryData(
final book = (await tester.runAsync(() => library.open('mara-island')))!; size: Size(320, 700),
final store = Progress.memory({'language': 'en'}); textScaler: TextScaler.linear(1.5),
final g = Game(book, store, library: library) ),
..showStory(2) child: Scaffold(
..showLibrary(); body: SingleChildScrollView(
await tester.pumpWidget( child: ShelfActivities(game: game, onPostcards: () {}),
RepaintBoundary( ),
key: const ValueKey('capture'), ),
child: LumenApp(game: g, adsEnabled: false),
), ),
); ),
// Cached asset futures were loaded in the real event loop above. );
for (var i = 0; i < 3; i++) { await tester.pumpAndSettle();
await tester.runAsync( for (final key in ['shelf-daily', 'shelf-postcards']) {
() => Future<void>.delayed(const Duration(milliseconds: 20)), final size = tester.getSize(find.byKey(ValueKey(key)));
); expect(size.width, greaterThan(250));
await tester.pump(); expect(size.height, greaterThanOrEqualTo(64));
}
expect(tester.takeException(), isNull);
});
testWidgets('daily play and postcards are on the shelf, not the book page', (
tester,
) async {
tester.view.physicalSize = const Size(600, 960);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.reset);
final library = (await tester.runAsync(StoryLibrary.load))!;
await tester.runAsync(() async {
for (final story in library.stories) {
await library.open(story.id);
} }
await tester.pumpAndSettle(); });
await capture(tester, 'shelf'); final book = (await tester.runAsync(() => library.open('mara-island')))!;
await tester.tap(find.byKey(const ValueKey('shelf-daily'))); final store = Progress.memory({'language': 'en'});
await tester.pumpAndSettle(); final g = Game(book, store, library: library)
expect(g.mode, Mode.daily); ..showStory(2)
expect(store.text('flutter_screen'), 'story'); ..showLibrary();
await tester.binding.handlePopRoute(); await tester.pumpWidget(
await tester.pumpAndSettle(); RepaintBoundary(
expect(g.screen, Screen.library); key: const ValueKey('capture'),
expect(store.text('notebook_last_page'), book.pages[2].id); child: LumenApp(game: g, adsEnabled: false),
expect(tester.takeException(), isNull); ),
await tester.pumpWidget(const SizedBox()); );
}, // Cached asset futures were loaded in the real event loop above.
); for (var i = 0; i < 3; i++) {
await tester.runAsync(
() => Future<void>.delayed(const Duration(milliseconds: 20)),
);
await tester.pump();
}
await tester.pumpAndSettle();
await capture(tester, 'shelf');
expect(find.text('Open-source licenses'), findsNothing);
await tester.tap(find.text('Settings'));
await tester.pumpAndSettle();
await tester.tap(find.text('Open-source licenses'));
await tester.pumpAndSettle();
expect(find.byType(OpenSourceLicenses), findsOneWidget);
await tester.pageBack();
await tester.pumpAndSettle();
expect(find.byKey(const ValueKey('shelf-activities')), findsOneWidget);
expect(find.byKey(const ValueKey('shelf-daily')), findsOneWidget);
await tester.tap(find.byKey(const ValueKey('shelf-postcards')));
await tester.pumpAndSettle();
expect(g.screen, Screen.postcards);
await tester.binding.handlePopRoute();
await tester.pumpAndSettle();
await tester.tap(find.byKey(const ValueKey('shelf-daily')));
await tester.pumpAndSettle();
expect(g.mode, Mode.daily);
await tester.binding.handlePopRoute();
await tester.pumpAndSettle();
expect(g.screen, Screen.library);
g.home();
await tester.pumpAndSettle();
expect(find.text('Play today’s puzzle →'), findsNothing);
expect(find.text('Island postcards'), findsNothing);
expect(find.textContaining('Practice ·'), findsNothing);
expect(find.textContaining('Difficulty ·'), findsNothing);
expect(tester.takeException(), isNull);
await tester.pumpWidget(const SizedBox());
});
} }
+115
View File
@@ -0,0 +1,115 @@
// Real Flutter UI captures at a 360 x 640 logical phone viewport, rendered at 3x.
// Run: flutter test tool/capture_play_store_test.dart
import 'dart:io';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:lumen/domain/game.dart';
import 'package:lumen/domain/library.dart';
import 'package:lumen/domain/postcards.dart';
import 'package:lumen/main.dart';
import 'package:lumen/services/progress.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
testWidgets('capture Play Store phone screens from the real app', (
tester,
) async {
tester.view.physicalSize = const Size(360, 640);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.reset);
await tester.runAsync(() async {
for (final name in ['sans-serif', 'serif', 'Roboto']) {
await (FontLoader(name)
..addFont(rootBundle.load('assets/fonts/NotoSans-Regular.ttf')))
.load();
}
for (final font in {
'MaraHand': 'DancingScript.ttf',
'LumenText': 'NotoSans-Regular.ttf',
'LumenSymbols': 'NotoSansSymbols-Regular.ttf',
'LumenSymbols2': 'NotoSansSymbols2-Regular.ttf',
'LumenMath': 'NotoSansMath-Regular.ttf',
}.entries) {
await (FontLoader(
font.key,
)..addFont(rootBundle.load('assets/fonts/${font.value}'))).load();
}
});
await tester.runAsync(() async {
await (FontLoader(
'MaterialIcons',
)..addFont(rootBundle.load('fonts/MaterialIcons-Regular.otf'))).load();
});
final library = (await tester.runAsync(StoryLibrary.load))!;
final book = (await tester.runAsync(() async {
for (final story in library.stories) {
await library.open(story.id);
}
return library.open('mara-island');
}))!;
final game = Game(
book,
Progress.memory({'language': 'en', 'ambience_enabled': false}),
library: library,
);
await tester.pumpWidget(
RepaintBoundary(
key: const ValueKey('store-capture'),
child: LumenApp(game: game, adsEnabled: false),
),
);
Future<void> capture(String name) async {
// Resolve asset IO in the real event loop without activating narration timers.
for (var i = 0; i < 5; i++) {
await tester.runAsync(
() => Future<void>.delayed(const Duration(milliseconds: 40)),
);
await tester.pump();
}
await tester.pumpAndSettle();
expect(tester.takeException(), isNull);
final boundary = tester.renderObject<RenderRepaintBoundary>(
find.byKey(const ValueKey('store-capture')),
);
await tester.runAsync(() async {
final image = await boundary.toImage(pixelRatio: 3);
final data = await image.toByteData(format: ui.ImageByteFormat.png);
final directory = Directory('artifacts/play-store/phone')
..createSync(recursive: true);
File('${directory.path}/$name.png')
.writeAsBytesSync(data!.buffer.asUint8List());
image.dispose();
});
}
game.home();
await capture('01-notebook');
game.showStory(book.pages.indexWhere((p) => p.id == 'cottage.window'));
await capture('02-story');
game.showStory(
book.pages.indexWhere((p) => p.id == 'cottage.match.puzzle'),
);
final puzzle = game.puzzle!;
for (var i = 0; i < puzzle.size * 2; i++) {
if (puzzle.given[i]) continue;
game.mark(i);
if (puzzle.solution[i] == 0) game.mark(i);
}
await capture('03-logic-puzzle');
for (var slot = 0; slot < 3; slot++) {
await game.store.set(
'done_${islandPostcards.first.puzzleKey(slot)}',
true,
);
}
game.showPostcards();
await capture('04-island-postcards');
game.showLibrary();
await capture('05-bookshelf');
await tester.pumpWidget(const SizedBox());
});
}