Add QR code scanning for server configuration

Adds QR code scanning functionality to both ServerSetupActivity and
SettingsActivity, allowing users to auto-fill server configuration by
scanning a QR code from the server's admin dashboard.

Changes:
- Add ZXing Android Embedded library (v4.3.0) for QR scanning
- Add CAMERA permission to AndroidManifest
- Create QrServerConfig model to parse and validate QR JSON data
- Create QrScannerUtil for shared scanning functionality
- Extend PermissionUtil with camera permission handling
- Add "Scan QR Code" button to ServerSetupActivity with hint text
- Add "Scan QR Code" button to SettingsActivity
- Add QR scan icon and string resources
- Configure Gradle Java toolchain auto-detection

The QR code contains JSON with server address, port, and client key
which are automatically populated into the input fields when scanned.
This commit is contained in:
2025-12-27 14:49:01 -05:00
parent a86c7b74aa
commit 0e08718566
12 changed files with 456 additions and 8 deletions

View File

@@ -1,6 +1,11 @@
android.suppressUnsupportedCompileSdk=36
android.useAndroidX=true
# Enable Gradle toolchain auto-detection and auto-download
org.gradle.java.installations.auto-detect=true
org.gradle.java.installations.auto-download=true
org.gradle.java.installations.paths=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
# JVM arguments for kapt with JDK 9+
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \