From 37d8e8cc7417db89718eedf7561844505da5ebe5 Mon Sep 17 00:00:00 2001 From: "Maurice L." Date: Tue, 3 Mar 2026 16:30:21 +0100 Subject: [PATCH] Refined network configuration and login UI The login screen now labels the server input as "Server-Domain", and the network provider has been updated to automatically prepend the HTTPS protocol. The database version has been incremented, and a network security configuration has been added to allow user certificates for debugging. Additionally, the encrypted shared preferences storage name was updated. --- app/src/main/AndroidManifest.xml | 2 +- .../main/java/de/miaurizius/shap_planner/TokenStorage.kt | 2 +- .../miaurizius/shap_planner/network/RetrofitProvider.kt | 2 +- .../java/de/miaurizius/shap_planner/room/AppDatabase.kt | 2 +- .../de/miaurizius/shap_planner/ui/screens/LoginScreen.kt | 2 +- app/src/main/res/xml/network_security_config.xml | 8 ++++++++ 6 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 app/src/main/res/xml/network_security_config.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bf735b4..48655ec 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -9,7 +9,7 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" - android:usesCleartextTraffic="true" + android:networkSecurityConfig="@xml/network_security_config" android:theme="@style/Theme.ShapPlanner"> Unit, onBack: (() -> Unit)? TextField( value = serverUrl, onValueChange = { serverUrl = it }, - label = { Text("Server-URL") } + label = { Text("Server-Domain") } ) Spacer(modifier = Modifier.height(8.dp)) diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..611b0ca --- /dev/null +++ b/app/src/main/res/xml/network_security_config.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file