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

@@ -0,0 +1,39 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M3,11h8V3H3V11zM5,5h4v4H5V5z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M3,21h8v-8H3V21zM5,15h4v4H5V15z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M13,3v8h8V3H13zM19,9h-4V5h4V9z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M19,19h2v2h-2z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M13,13h2v2h-2z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M15,15h2v2h-2z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M13,17h2v2h-2z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M15,19h2v2h-2z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M17,17h2v2h-2z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M17,13h2v2h-2z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M19,15h2v2h-2z"/>
</vector>