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

@@ -56,6 +56,9 @@ dependencies {
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'androidx.palette:palette:1.0.0'
// QR Code scanning
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
// Room
def room_version = "2.6.1"
implementation "androidx.room:room-runtime:$room_version"