Added Android Permissions
Build Android Apk / android (release) Successful in 11m5s
Build Linux Application / linux (release) Successful in 4m57s
Publish Docker Image / docker (release) Successful in 13m50s

This commit is contained in:
2026-09-07 15:23:52 +02:00
parent e8598a2e43
commit df7bb5e181
2 changed files with 18 additions and 1 deletions
+5
View File
@@ -68,6 +68,11 @@ Notes that are easy to get wrong:
The backend host/port is configured once in `lib/main.dart` via `AcApi.configure(const ApiConfig(host: 'localhost', port: 5118))`. Plain http is intentional — the API is only reached inside a trusted network. There is no environment/config file; changing the backend address means editing `main.dart`.
On android two things in `android/app/src/main/AndroidManifest.xml` have to stay in place for that to work, and both only bite the **release** apk:
- `<uses-permission android:name="android.permission.INTERNET"/>` — flutter ships this permission only in `src/debug` and `src/profile`, which a release build does not merge. Without it every request fails with `SocketException: Connection failed (OS Error: Operation not permitted)`, because the app may not open a socket at all.
- `android:usesCleartextTraffic="true"` on `<application>` — android blocks plain http since api 28 (the app targets 36). Without it requests fail with `CLEARTEXT communication to <host> not permitted`. Remove the attribute once the backend speaks https.
## Architecture
### API layer (`lib/Api/`)