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:
@@ -67,4 +67,13 @@
|
||||
<string name="expiry_time_note">Maximum 24 hours (1 day)</string>
|
||||
<string name="cancel_button">Cancel</string>
|
||||
<string name="upload_button">Upload</string>
|
||||
|
||||
<!-- QR Code Scanning -->
|
||||
<string name="scan_qr_code_button">Scan QR Code</string>
|
||||
<string name="scan_qr_code_hint">Scan a QR code from your server admin panel to auto-fill settings</string>
|
||||
<string name="qr_scan_success">Configuration loaded from QR code</string>
|
||||
<string name="qr_scan_cancelled">QR code scan cancelled</string>
|
||||
<string name="qr_scan_error">QR code error: %1$s</string>
|
||||
<string name="camera_permission_required">Camera permission is required to scan QR codes</string>
|
||||
<string name="camera_permission_denied">Camera permission denied. Please enable it in Settings to scan QR codes.</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user