Scan the enrollment QR in-app instead of relying on the camera app
Not every phone's camera app hands a scanned aiapp:// URI off to the app reliably, which made enrollment an annoying multi-step process. The Settings screen now scans the QR itself via zxing-android-embedded's ScanContract (offline, no Play Services/ML Kit download) and feeds the decoded URI through the existing parseEnrollmentUri. The aiapp://enroll deep link stays as a fallback for cameras that do redirect. Verified on the emulator: Scan QR code launches the scanner, prompts for camera permission, shows a live preview, and backing out returns to Settings cleanly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017xn8nHw1tw1R6PtiY1eEtw
This commit is contained in:
1 parent
99bcc341c1
commit
da2c110429
5 files changed
+56
-13
No files matched your search
@@ -27,8 +27,12 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<!-- Enrollment: the server prints its aiapp://enroll QR to the
|
||||
terminal; the phone's camera app opens the URI here, so no
|
||||
camera code or QR library is needed in this app. -->
|
||||
terminal. This intent filter is the fallback path for a
|
||||
camera app that redirects a scanned aiapp:// URI here
|
||||
directly; the Settings screen's own "Scan QR code" button
|
||||
(zxing-android-embedded) is the primary path and needs no
|
||||
filter, since it decodes the QR itself and hands the URI
|
||||
to parseEnrollmentUri in-process. -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
Reference in new issue
Block a user