feat: scan the pairing QR code with the camera
The pairing dialog gained a "扫码" button: a full-screen scanner points the back camera at the QR that OpenChamber's connect-a-device dialog shows, and a decoded pairing link connects straight away. Frames are decoded with zxing2 (pure Dart, no ML Kit or Play services): the YUV420 Y plane is already luminance, BGRA frames are converted green-weighted, and each frame is decoded in a background isolate so camera frames never block the UI. Only an openchamber://connect payload ends the scan; any other QR code shows a short hint and scanning continues. A torch button, a denied-permission message with retry, and camera-less devices are handled. The recorder audio permission the camera plugin declares for video is removed from the merged manifest: the scanner reads frames only. 0.4.5 (405).
This commit is contained in:
1 parent
902f1e18bb
commit
8f6fd99103
10 files changed
+634
-13
No files matched your search
@@ -1,5 +1,12 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
<!-- The camera plugin declares audio for video; the scanner only reads
|
||||
frames, so the app must not end up asking for the microphone. -->
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove"/>
|
||||
<uses-feature android:name="android.hardware.camera" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
|
||||
<application
|
||||
android:label="OpenChamber"
|
||||
android:name="${applicationName}"
|
||||
|
||||
Reference in new issue
Block a user