Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixing #99

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ android {
compileSdk 33

compileOptions {
// for flutter_local_notification: Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
// set Java compatibility to Java 17
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
Expand All @@ -54,6 +57,7 @@ android {
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true // for flutter_local_notification plugin
}

signingConfigs {
Expand Down Expand Up @@ -94,5 +98,12 @@ flutter {
}

dependencies {
// for flutter_local_notification: to prevent the app from crashing on Android 12L and higher
implementation "androidx.window:window:1.0.0"
// For Java-friendly APIs to register and unregister callbacks
implementation "androidx.window:window-java:1.0.0"
// for flutter_local_notification plugin
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
19 changes: 18 additions & 1 deletion android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,21 @@
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
##---------------End: proguard configuration for Gson ----------
##---------------End: proguard configuration for Gson ----------


## ---------- rules for androidx.window:window ------------ ##
# This is generated automatically by the Android Gradle plugin.
-dontwarn androidx.window.extensions.WindowExtensions
-dontwarn androidx.window.extensions.WindowExtensionsProvider
-dontwarn androidx.window.extensions.layout.DisplayFeature
-dontwarn androidx.window.extensions.layout.FoldingFeature
-dontwarn androidx.window.extensions.layout.WindowLayoutComponent
-dontwarn androidx.window.extensions.layout.WindowLayoutInfo
-dontwarn androidx.window.sidecar.SidecarDeviceState
-dontwarn androidx.window.sidecar.SidecarDisplayFeature
-dontwarn androidx.window.sidecar.SidecarInterface$SidecarCallback
-dontwarn androidx.window.sidecar.SidecarInterface
-dontwarn androidx.window.sidecar.SidecarProvider
-dontwarn androidx.window.sidecar.SidecarWindowLayoutInfo
## --------- End: rules for androidx.window:window ------- ##
17 changes: 13 additions & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,23 @@
</intent-filter>
</receiver>

<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>

</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<!-- <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> -->
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<!-- For apps with targetSDK >= 31 (Android 12+) -->
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
<queries>
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = "1.9.10"
ext.kotlin_version = "1.9.21"
repositories {
google()
mavenCentral()
}

dependencies {
classpath "com.android.tools.build:gradle:8.1.2"
classpath "com.android.tools.build:gradle:8.1.4"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/class/abstract_Place.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ abstract class Place {
}
final updater = Provider.of<Update>(context, listen: false);
updater.updateReadStatusInList();
saveMyPlacesList();
}

/// set the read and notified status from all warnings to false
Expand Down
2 changes: 1 addition & 1 deletion lib/class/class_userPreferences.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class UserPreferences {
bool showAllWarnings = false;
bool areWarningsFromCache = false;

String versionNumber = "0.6.0"; // shown in the about view
String versionNumber = "0.6.1"; // shown in the about view

bool activateAlertSwiss = false;
bool isFirstStart = true;
Expand Down
3 changes: 2 additions & 1 deletion lib/views/WarningDetailView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ class _DetailScreenState extends State<DetailScreen> {
setState(() {
widget._warnMessage.read = true;
});
saveMyPlacesList(); //@todo nötig?
// save places List to store new read state
saveMyPlacesList();

List<String> generateAreaDescList(int length) {
List<String> tempList = [];
Expand Down
5 changes: 5 additions & 0 deletions lib/widgets/WarningWidget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:provider/provider.dart';
import '../class/class_WarnMessage.dart';
import '../class/class_Area.dart';
import '../class/class_Geocode.dart';
import '../services/saveAndLoadSharedPreferences.dart';
import '../views/WarningDetailView.dart';
import '../services/updateProvider.dart';
import '../services/translateAndColorizeWarning.dart';
Expand Down Expand Up @@ -56,6 +57,8 @@ class WarningWidget extends StatelessWidget {
_warnMessage.read = false;
final updater = Provider.of<Update>(context, listen: false);
updater.updateReadStatusInList();
// save places list to store new read state
saveMyPlacesList();
},
icon: Icon(
Icons.mark_chat_read,
Expand All @@ -66,6 +69,8 @@ class WarningWidget extends StatelessWidget {
_warnMessage.read = true;
final updater = Provider.of<Update>(context, listen: false);
updater.updateReadStatusInList();
// save places list to store new read state
saveMyPlacesList();
},
icon: Icon(
Icons.warning_amber_outlined,
Expand Down
5 changes: 5 additions & 0 deletions lib/widgets/dialogs/ChangeLogDialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ class ChangeLogDialog extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
"0.6.1 (beta)",
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
),
Text("* Fehlerbehebungen \n"),
Text(
"0.6.0 (beta)",
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
Expand Down
56 changes: 28 additions & 28 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ packages:
dependency: transitive
description:
name: cross_file
sha256: "445db18de832dba8d851e287aff8ccf169bed30d2e94243cb54c7d2f1ed2142c"
sha256: "2f9d2cbccb76127ba28528cb3ae2c2326a122446a83de5a056aaa3880d3882c5"
url: "https://pub.dev"
source: hosted
version: "0.3.3+6"
version: "0.3.3+7"
crypto:
dependency: transitive
description:
Expand All @@ -77,10 +77,10 @@ packages:
dependency: transitive
description:
name: dbus
sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263"
sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
url: "https://pub.dev"
source: hosted
version: "0.7.8"
version: "0.7.10"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -241,10 +241,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1"
sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.2.1"
path_provider_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -297,18 +297,18 @@ packages:
dependency: transitive
description:
name: plugin_platform_interface
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8
url: "https://pub.dev"
source: hosted
version: "2.1.6"
version: "2.1.7"
provider:
dependency: "direct main"
description:
name: provider
sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f
sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096"
url: "https://pub.dev"
source: hosted
version: "6.0.5"
version: "6.1.1"
rxdart:
dependency: "direct main"
description:
Expand Down Expand Up @@ -470,42 +470,42 @@ packages:
dependency: "direct main"
description:
name: url_launcher
sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27"
sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba
url: "https://pub.dev"
source: hosted
version: "6.1.14"
version: "6.2.1"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330
sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def"
url: "https://pub.dev"
source: hosted
version: "6.1.0"
version: "6.2.0"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f"
sha256: bba3373219b7abb6b5e0d071b0fe66dfbe005d07517a68e38d4fc3638f35c6d3
url: "https://pub.dev"
source: hosted
version: "6.1.5"
version: "6.2.1"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e
sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
version: "3.1.0"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88
sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
url: "https://pub.dev"
source: hosted
version: "3.0.7"
version: "3.1.0"
url_launcher_platform_interface:
dependency: transitive
description:
Expand All @@ -518,26 +518,26 @@ packages:
dependency: transitive
description:
name: url_launcher_web
sha256: "043a0d5b83bb7a6f4f0040763dd7b23e75c8e1979cc1109a545054b6dcf56d17"
sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.2.0"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069"
sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc"
url: "https://pub.dev"
source: hosted
version: "3.0.8"
version: "3.1.0"
uuid:
dependency: transitive
description:
name: uuid
sha256: b715b8d3858b6fa9f68f87d20d98830283628014750c2b09b6f516c1da4af2a7
sha256: df5a4d8f22ee4ccd77f8839ac7cb274ebc11ef9adcce8b92be14b797fe889921
url: "https://pub.dev"
source: hosted
version: "4.1.0"
version: "4.2.1"
vector_math:
dependency: transitive
description:
Expand All @@ -558,10 +558,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3"
sha256: "7c99c0e1e2fa190b48d25c81ca5e42036d5cac81430ef249027d97b0935c553f"
url: "https://pub.dev"
source: hosted
version: "5.0.9"
version: "5.1.0"
xdg_directories:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: foss_warn
description: Eine FOSS Umsetzung von NINA
publish_to: 'none'
version: 0.6.0+28
version: 0.6.1+29

environment:
sdk: ">=2.17.0 <3.13.3"
Expand All @@ -15,9 +15,9 @@ dependencies:
flutter_local_notifications: ^16.1.0
shared_preferences: ^2.2.2
shared_preferences_android: ^2.2.1
provider: ^6.0.5
provider: ^6.1.1
rxdart: ^0.27.7
url_launcher: ^6.1.14
url_launcher: ^6.2.1
share_plus: ^7.2.1
android_alarm_manager_plus: ^3.0.3
intl: ^0.18.1 # for localizations
Expand Down