From 2ed3ee0ea1048d2059a05f4ec769b29c567f9b48 Mon Sep 17 00:00:00 2001 From: Hadrian Burkhardt Date: Sun, 25 Oct 2026 03:26:24 +0100 Subject: [PATCH] app: privacy policy link in the settings sheet - new lib/src/ui/links.dart holds kPrivacyPolicyUrl (single source of truth for the app, the store listing and the compliance docs) - settings sheet: "Datenschutzerklaerung" tile opens the policy in the browser via url_launcher; manifest grown a VIEW/https intent so Android 11+ can resolve it - verified on device: tap sends ACTION_VIEW for the URL and Chrome comes up - guard: tools/build_release.sh aborts while links.dart still contains the example.invalid placeholder, so a release cannot ship without a policy URL - docs: compliance row updated (in-app entry done, only the public URL missing) --- CHANGELOG.md | 2 + app/android/app/src/main/AndroidManifest.xml | 6 ++ app/lib/main.dart | 16 +++++ app/lib/src/ui/links.dart | 11 ++++ app/pubspec.lock | 64 ++++++++++++++++++++ app/pubspec.yaml | 1 + docs/compliance-play-store.md | 2 +- tools/build_release.sh | 8 +++ 8 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 app/lib/src/ui/links.dart diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a7a6d9..4e26d88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ Alle nennenswerten Änderungen an diesem Projekt. Format nach - (build) Version 0.8.0 (10): neuer Ingame-Renderer, generierte Marken-Art, Splash-Kette; signiertes App Bundle mit Upload-Keystore ### Added +- (app) Datenschutzerklärung im Einstellungen-Sheet (öffnet die Webseite über `url_launcher`), + Manifest-`` für den Browser, Release-Guard gegen die Platzhalter-URL - (game) Ingame-Grafik neu: Himmel mit kamerarelativ platzierter Sonne, drei parallaxe Bergrücken, Boden mit Verlauf/Schattenlippe/Felsbrocken, Panzer mit Kette/Turm/Rohr, Kometenschweif, Explosion mit Funken, Zielhilfe (`lib/src/game/art.dart`) diff --git a/app/android/app/src/main/AndroidManifest.xml b/app/android/app/src/main/AndroidManifest.xml index c7e4df1..2a3b75c 100644 --- a/app/android/app/src/main/AndroidManifest.xml +++ b/app/android/app/src/main/AndroidManifest.xml @@ -44,6 +44,12 @@ In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. --> + + + + + diff --git a/app/lib/main.dart b/app/lib/main.dart index 9412752..806e4d8 100644 --- a/app/lib/main.dart +++ b/app/lib/main.dart @@ -3,6 +3,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter/material.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'src/ads/ads_service.dart'; import 'src/game/iron_arc_game.dart'; @@ -10,6 +11,7 @@ import 'src/native/native_match.dart'; import 'src/net/api_client.dart'; import 'src/net/match_session.dart'; import 'src/net/offline_queue.dart'; +import 'src/ui/links.dart'; import 'src/ui/splash_screen.dart'; import 'src/ui/widgets.dart'; @@ -183,6 +185,20 @@ class _MatchScreenState extends State { if (mounted) _toast('Consent: ${_ads.consentLabel}'); }, ), + ListTile( + leading: const Icon(Icons.description_outlined), + title: const Text('Datenschutzerklärung'), + subtitle: const Text('Öffnet die Webseite'), + trailing: const Icon(Icons.open_in_new, size: 18), + onTap: () async { + Navigator.pop(sheetContext); + final ok = await launchUrl( + Uri.parse(kPrivacyPolicyUrl), + mode: LaunchMode.externalApplication, + ); + if (!ok && mounted) _toast('Keine App zum Öffnen gefunden'); + }, + ), ListTile( leading: const Icon(Icons.campaign_outlined), title: const Text('Werbe-Status'), diff --git a/app/lib/src/ui/links.dart b/app/lib/src/ui/links.dart new file mode 100644 index 0000000..0d687b2 --- /dev/null +++ b/app/lib/src/ui/links.dart @@ -0,0 +1,11 @@ +/// External links. Single source of truth: the settings sheet, the store +/// listing and the compliance docs all quote these strings. +/// +/// The privacy policy URL must stay publicly reachable without login - Play +/// rejects listings that point at a gated page, and AdMob shows it inside the +/// consent form. `tools/build_release.sh` refuses to build while the +/// placeholder below is still in place. +const String kPrivacyPolicyUrl = 'https://example.invalid/iron-arc/privacy'; + +/// Placeholder marker used by the release guard. +const String kPrivacyPolicyPlaceholder = 'example.invalid'; diff --git a/app/pubspec.lock b/app/pubspec.lock index c31487e..516fd8f 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -389,6 +389,70 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" + 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" vector_math: dependency: transitive description: diff --git a/app/pubspec.yaml b/app/pubspec.yaml index f5c8ff9..00cb544 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -39,6 +39,7 @@ dependencies: http: ^1.6.0 shared_preferences: ^2.5.6 google_mobile_ads: ^9.2.0 + url_launcher: ^6.3.0 dev_dependencies: flutter_test: diff --git a/docs/compliance-play-store.md b/docs/compliance-play-store.md index de73015..e6ab8fc 100644 --- a/docs/compliance-play-store.md +++ b/docs/compliance-play-store.md @@ -43,7 +43,7 @@ Legende: `[ ]` offen · `[x]` erledigt · `[~]` teilweise/geplant mit Owner | `[x]` | Enthält Werbung | **Ja** – AdMob SDK im Release-APK, App ID verifiziert | | `[ ]` | Zielgruppe | **13+**, **nicht** am Families-Programm teilnehmen | | `[ ]` | Altersfreigabe (IARC) | Erwartung: USK 12 / PEGI 12 (kompetitive Gewalt, keine realistischen Darstellungen, keine Sprache) | -| `[~]` | Datenschutzerklärung | Text fertig: [privacy-policy.md](privacy-policy.md) + `store/privacy-policy.html`. **URL fehlt noch** (auf softwareapp-hb.de hosten, dann in der Console eintragen). Deckt: Geräte-ID, Match-/Replay-Daten, AdMob (Werbe-ID, IP, Geräteinfos), ungefährer Standort aus IP. **Keine** Analytics-, Crash- oder Firebase-SDKs im Build | +| `[~]` | Datenschutzerklärung | Text fertig: [privacy-policy.md](privacy-policy.md) + `store/privacy-policy.html`. In-App-Einstieg ist **implementiert** (Zahnrad → „Datenschutzerklärung“, `url_launcher`, auf Gerät verifiziert); es fehlt nur die öffentliche URL in `app/lib/src/ui/links.dart`. `tools/build_release.sh` bricht ab, solange dort der Platzhalter steht. Deckt: Geräte-ID, Match-/Replay-Daten, AdMob (Werbe-ID, IP, Geräteinformationen), ungefährer Standort aus IP. **Keine** Analytics-, Crash- oder Firebase-SDKs im Build | | `[~]` | Data-Safety-Formular | Angaben aus [privacy-policy.md](privacy-policy.md) übernehmen: Geräte-IDs (App-Funktion), ungefährer Standort aus IP + Werbe-ID (durch AdMob, Weitergabe an Google), **keine** Crash-Logs, **keine** Käufe (bis M7c) | | `[ ]` | Account-Löschung | In-App **und** Web-URL, da Accounts existieren (Firebase/Leaderboard) | | `[ ]` | Nachrichten-App? | Nein | diff --git a/tools/build_release.sh b/tools/build_release.sh index 7161e38..579187e 100755 --- a/tools/build_release.sh +++ b/tools/build_release.sh @@ -31,6 +31,14 @@ done (cd build/native-symbols && zip -qr ../native-debug-symbols.zip .) echo "symbols: $(stat -c%s build/native-debug-symbols.zip) bytes" +echo '==> Release guards' +if grep -q 'example.invalid' app/lib/src/ui/links.dart; then + echo 'ERROR: privacy policy URL is still the placeholder (app/lib/src/ui/links.dart).' >&2 + echo ' Play rejects a listing whose privacy policy is not reachable.' >&2 + exit 1 +fi +echo "OK: privacy policy -> $(grep -oE "https://[^']+" app/lib/src/ui/links.dart)" + echo '==> Flutter bundle (AAB)' (cd app && flutter build appbundle --release)