From d0c44157f1f8e723dce187b186847d0b30ed687a Mon Sep 17 00:00:00 2001 From: Jan Pleterski Date: Mon, 16 Nov 2026 11:46:38 +0100 Subject: [PATCH] google addin --- android/app/src/main/AndroidManifest.xml | 1 + .../reports/problems/problems-report.html | 663 ++++++++++++++++++ lib/screens/settings_screen.dart | 50 +- lib/services/notification_service.dart | 31 +- lib/utils/translations.dart | 10 + store/listing.md | 85 +++ store/privacy-policy.html | 83 +++ 7 files changed, 905 insertions(+), 18 deletions(-) create mode 100644 android/build/reports/problems/problems-report.html create mode 100644 store/listing.md create mode 100644 store/privacy-policy.html diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 11baf2f..1fcc6ca 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -8,6 +8,7 @@ + diff --git a/android/build/reports/problems/problems-report.html b/android/build/reports/problems/problems-report.html new file mode 100644 index 0000000..e78d389 --- /dev/null +++ b/android/build/reports/problems/problems-report.html @@ -0,0 +1,663 @@ + + + + + + + + + + + + + Gradle Configuration Cache + + + +
+ +
+ Loading... +
+ + + + + + diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index dc8717f..2ca7c23 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:package_info_plus/package_info_plus.dart'; +import 'package:url_launcher/url_launcher.dart'; import '../services/app_settings.dart'; import '../utils/translations.dart'; import '../services/notification_service.dart'; @@ -12,6 +13,8 @@ import 'camera_settings_screen.dart'; class SettingsScreen extends StatelessWidget { const SettingsScreen({super.key}); + static const _privacyPolicyUrl = 'https://sdkovinarmuta.si/privacy-and-policy/'; + static final Future _packageInfo = PackageInfo.fromPlatform(); @override @@ -119,6 +122,17 @@ class SettingsScreen extends StatelessWidget { ), ]), + SectionHeader(t('About')), + GroupCard(children: [ + SettingsTile( + title: t('Privacy policy'), + onTap: () => launchUrl( + Uri.parse(_privacyPolicyUrl), + mode: LaunchMode.externalApplication, + ), + ), + ]), + const SizedBox(height: 28), FutureBuilder( future: _packageInfo, @@ -233,23 +247,27 @@ class SettingsScreen extends StatelessWidget { final s = AppSettings.instance; showModalBottomSheet( context: context, + // 7 options exceed the default 9/16 height cap on smaller phones + isScrollControlled: true, builder: (sheet) => SafeArea( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - _SheetTitle(s.t('Remind me')), - for (final h in AppSettings.reminderHourOptions) - SheetOption( - label: _hoursBefore(h), - selected: h == s.reminderHours, - selectedColor: s.bulletColor, - onTap: () { - s.setReminderHours(h).then((_) => _reschedule()); - Navigator.pop(sheet); - }, - ), - const SizedBox(height: 8), - ], + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + _SheetTitle(s.t('Remind me')), + for (final h in AppSettings.reminderHourOptions) + SheetOption( + label: _hoursBefore(h), + selected: h == s.reminderHours, + selectedColor: s.bulletColor, + onTap: () { + s.setReminderHours(h).then((_) => _reschedule()); + Navigator.pop(sheet); + }, + ), + const SizedBox(height: 8), + ], + ), ), ), ); diff --git a/lib/services/notification_service.dart b/lib/services/notification_service.dart index 699b107..62a0d40 100644 --- a/lib/services/notification_service.dart +++ b/lib/services/notification_service.dart @@ -63,9 +63,34 @@ class NotificationService { AndroidFlutterLocalNotificationsPlugin>(); await androidPlugin?.createNotificationChannel(_channel); await requestPermissions(); + await _requestExactAlarmsOnce(); } catch (_) {} } + // Android 12+ needs "Alarms & reminders" access for on-time delivery + // (denied by default on Android 14+). Ask once; without it we fall back + // to inexact alarms, which Android may delay by an hour or more. + Future _requestExactAlarmsOnce() async { + final android = _plugin.resolvePlatformSpecificImplementation< + AndroidFlutterLocalNotificationsPlugin>(); + if (android == null) return; + if (await android.canScheduleExactNotifications() ?? true) return; + + final prefs = await SharedPreferences.getInstance(); + if (prefs.getBool('exactAlarmAsked') ?? false) return; + await prefs.setBool('exactAlarmAsked', true); + await android.requestExactAlarmsPermission(); + } + + Future _scheduleMode() async { + final android = _plugin.resolvePlatformSpecificImplementation< + AndroidFlutterLocalNotificationsPlugin>(); + final canExact = await android?.canScheduleExactNotifications() ?? true; + return canExact + ? AndroidScheduleMode.exactAllowWhileIdle + : AndroidScheduleMode.inexactAllowWhileIdle; + } + /// Fetches the calendar and reschedules all reminders. Call on app start /// and whenever notification settings change. Future rescheduleFromCalendar() async { @@ -118,6 +143,7 @@ class NotificationService { final notifyTekma = prefs.getBool('notifyTekma') ?? true; final language = prefs.getString('language') ?? 'Slovenian'; final now = DateTime.now(); + final mode = await _scheduleMode(); await _plugin.cancelAll(); @@ -143,6 +169,7 @@ class NotificationService { title: event.summary ?? 'Event', body: _startsIn(hours, language), scheduledDate: notifyAt, + mode: mode, ); } } @@ -167,6 +194,7 @@ class NotificationService { required String title, required String body, required DateTime scheduledDate, + required AndroidScheduleMode mode, }) async { final tzDate = tz.TZDateTime.from(scheduledDate, tz.local); await _plugin.zonedSchedule( @@ -175,8 +203,7 @@ class NotificationService { body, tzDate, _notifDetails, - // Inexact: avoids the SCHEDULE_EXACT_ALARM permission (Play policy). - androidScheduleMode: AndroidScheduleMode.inexactAllowWhileIdle, + androidScheduleMode: mode, uiLocalNotificationDateInterpretation: UILocalNotificationDateInterpretation.absoluteTime, ); diff --git a/lib/utils/translations.dart b/lib/utils/translations.dart index 61f8406..b6425cd 100644 --- a/lib/utils/translations.dart +++ b/lib/utils/translations.dart @@ -192,6 +192,16 @@ class AppTranslations { }, // Camera settings + 'About': { + 'English': 'About', + 'Slovenian': 'O aplikaciji', + 'German': 'Über', + }, + 'Privacy policy': { + 'English': 'Privacy policy', + 'Slovenian': 'Politika zasebnosti', + 'German': 'Datenschutzerklärung', + }, 'Camera Settings': { 'English': 'Camera Settings', 'Slovenian': 'Nastavitve kamere', diff --git a/store/listing.md b/store/listing.md new file mode 100644 index 0000000..40ab245 --- /dev/null +++ b/store/listing.md @@ -0,0 +1,85 @@ +# Google Play listing — SD Kovinar + +App name (max 30): **SD Kovinar** +Category: Sports · Free · No ads · Contains no in-app purchases +Website (Store settings → Contact details): https://sdkovinarmuta.si/ +Contact email (Store settings → Contact details, shown publicly): dev.bl3kunja@gmail.com + +--- + +## Slovenščina (default) + +### Kratek opis (max 80) +Točkovanje tarč s kamero, živi prenos tarče in dnevnik treningov za strelce. + +### Celoten opis +SD Kovinar je aplikacija za strelce, ki želijo hitro in natančno spremljati svoje rezultate. + +🎯 TOČKOVANJE S KAMERO +Fotografiraj tarčo in aplikacija sama poišče zadetke ter izračuna rezultat. Prepoznavanje poteka v celoti na telefonu, brez interneta. + +📷 ŽIVI PRENOS TARČE +Poveži IP kamero na strelišču in spremljaj tarčo v živo med streljanjem, brez hoje do tarče. Podprta je tudi kamera telefona ter več lokacij s kamerami. + +📖 KNJIGA REZULTATOV +Vsi treningi in tekmovanja na enem mestu: skupni rezultat, povprečje na strel in na tarčo ter grafi napredka po mesecih in letih. + +📤 DELI REZULTAT +Z enim dotikom ustvari sliko tarče z zadetki, točkami in grafom ter jo pošlji prijateljem. + +🎨 PO TVOJI MERI +Več vrst tarč (tudi tarča po meri), izbira barve zadetkov, svetla in temna tema (po nastavitvi telefona). Jeziki: slovenščina, angleščina in nemščina. + +👥 ZA ČLANE KLUBA +Člani SD Kovinar Muta s klubsko kodo dobijo še koledar treningov z opomniki in kontakte članov. + +Brez oglasov, brez računa. Vsi tvoji podatki ostanejo na tvojem telefonu. + +--- + +## English + +### Short description (max 80) +Score targets with your camera, watch live target cams and track your training. + +### Full description +SD Kovinar is an app for shooters who want to track their results quickly and accurately. + +🎯 CAMERA SCORING +Take a photo of your target and the app finds the hits and calculates the score. Detection runs entirely on your phone, no internet needed. + +📷 LIVE TARGET VIEW +Connect an IP camera at the range and watch your target live while shooting, without walking to it. Your phone's camera and multiple camera locations are supported too. + +📖 RESULT BOOK +All trainings and competitions in one place: total score, average per shot and per target, and progress charts by month and year. + +📤 SHARE YOUR RESULT +One tap creates an image of your target with hits, scores and chart, ready to send to friends. + +🎨 MAKE IT YOURS +Several target types (including a custom target), hit colour choice, light and dark theme (follows your phone). Languages: Slovenian, English and German. + +👥 FOR CLUB MEMBERS +SD Kovinar Muta members with the club code also get the training calendar with reminders and member contacts. + +No ads, no account. All your data stays on your phone. + +--- + +## Deutsch (optional) + +### Kurzbeschreibung (max 80) +Scheiben per Kamera auswerten, Trefferbild live sehen und Training verfolgen. + +--- + +## Play Console answers (for reference) + +- **Data safety:** No data collected. No data shared. (Camera photos are processed on the device; nothing is uploaded.) +- **Ads:** No ads. +- **Target audience:** 18+ (or 13+), not designed for children. +- **Content rating:** sports app; no violence, no user interaction/chat, no purchases. +- **App access:** All core features work without login. Club features (calendar, contacts) need a club code — provide a code for reviewers in "App access" or state they are optional. +- **Account deletion:** Not applicable — the app has no accounts. +- **Privacy policy URL:** https://sdkovinarmuta.si/privacy-and-policy/ diff --git a/store/privacy-policy.html b/store/privacy-policy.html new file mode 100644 index 0000000..59ad027 --- /dev/null +++ b/store/privacy-policy.html @@ -0,0 +1,83 @@ + + + + + +SD Kovinar – Politika zasebnosti / Privacy Policy + + + + +

Politika zasebnosti – SD Kovinar

+

Velja od: 13. 11. 2026

+ +

Aplikacijo SD Kovinar je razvil član strelskega društva SD Kovinar Muta. Ta stran pojasnjuje, katere podatke aplikacija uporablja.

+ +

Na kratko

+

Aplikacija ne zbira, ne pošilja in ne deli osebnih podatkov. Nima računov, oglasov ali analitike. Vsi tvoji podatki ostanejo na tvojem telefonu.

+ +

Kamera

+

Kamera se uporablja samo za fotografiranje tarče in prikaz v živo. Prepoznavanje zadetkov poteka v celoti na napravi. Slike se nikamor ne pošiljajo.

+ +

Shranjeni podatki

+

Rezultati, slike tarč in nastavitve se shranijo samo v pomnilnik aplikacije na tvojem telefonu. Ob odstranitvi aplikacije se izbrišejo.

+ +

IP kamere

+

Če dodaš IP kamero, se aplikacija poveže neposredno na naslov, ki ga vneseš sam (običajno v lokalnem omrežju strelišča). Podatki ne gredo prek naših strežnikov.

+ +

Koledar treningov

+

Koledar se prenese iz javnega Google koledarja društva, ki je objavljen tudi na sdkovinarmuta.si. Pri tem Google kot pri vsakem spletnem zahtevku vidi IP naslov naprave. Opomniki se nastavijo lokalno na telefonu.

+ +

Podatki za člane

+

Kontakti članov so v aplikaciji šifrirani in so dostopni samo s klubsko kodo. Aplikacija jih ne pošilja nikamor.

+ +

Deljenje

+

Ko izbereš »Deli«, aplikacija ustvari sliko rezultata in odpre sistemski meni za deljenje. Kam jo pošlješ, izbereš sam.

+ +

Otroci

+

Aplikacija ni namenjena otrokom, mlajšim od 13 let.

+ +

Spremembe in kontakt

+

Morebitne spremembe bodo objavljene na tej strani. Vprašanja: dev.bl3kunja@gmail.com

+ +
+ +

Privacy Policy – SD Kovinar

+

Effective: 13 November 2026

+ +

The SD Kovinar app was developed by a member of the shooting club SD Kovinar Muta. This page explains what data the app uses.

+ +

In short

+

The app does not collect, transmit or share personal data. It has no accounts, ads or analytics. All your data stays on your phone.

+ +

Camera

+

The camera is used only to photograph targets and for live view. Hit detection runs entirely on the device. Images are never uploaded.

+ +

Stored data

+

Results, target images and settings are stored only in the app's private storage on your phone and are deleted when you uninstall the app.

+ +

IP cameras

+

If you add an IP camera, the app connects directly to the address you enter (usually on the range's local network). No data passes through our servers.

+ +

Training calendar

+

The calendar is downloaded from the club's public Google Calendar, which is also published on sdkovinarmuta.si. As with any web request, Google sees the device's IP address. Reminders are scheduled locally on the phone.

+ +

Member data

+

Member contacts are encrypted inside the app and only accessible with the club code. The app never sends them anywhere.

+ +

Sharing

+

When you tap "Share", the app creates a result image and opens the system share menu. You choose where it goes.

+ +

Children

+

The app is not directed at children under 13.

+ +

Changes and contact

+

Any changes will be published on this page. Questions: dev.bl3kunja@gmail.com

+ + +