feat(android): add biometrics support for Android emulators#4934
feat(android): add biometrics support for Android emulators#4934limpbrains wants to merge 1 commit intowix:masterfrom
Conversation
fcb93cf to
dfdc04c
Compare
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dfdc04c to
86a9ad9
Compare
Questions for maintainersA few design decisions I'd like to double-check before merging — happy to revise any of these:
cc @noomorph |
Description
In this pull request, I have added Android emulator support for Detox's biometrics API. Existing iOS
behavior is unchanged. Reviewed and tested end-to-end on a real emulator before submission.
device.setBiometricEnrollment(bool)anddevice.matchFinger()/unmatchFinger()now work onAndroid emulators (AVDs), using the Virtual Fingerprint HAL.
device.matchFace()/unmatchFace()work on Android emulators via the Virtual Face HAL, opt-inwith
setBiometricEnrollment(true, { androidFace: true }). The face path reboots the emulator onfirst activation (~20s); subsequent calls short-circuit (~3s).
"only supported on Android emulators (AVDs)"errors with actionable hints.
Test plan
ADB.test.js,AndroidDriver.test.js, newEmulatorDriver.test.js,RuntimeDevice.test.js.detox/test/e2e/14.android-biometrics.test.js), covering both fingerprint and face paths including idempotent re-enable.setBiometricEnrollment(bool)callers and all iOS behavior unchanged.I have added/updated the relevant references in the documentation files —
docs/api/device.md.I have made the necessary changes in the types index file —
detox/detox.d.ts(newBiometricEnrollmentOptionstype + refreshed JSDoc;detox/index.d.tsis a pass-through wrapper so no direct edit was needed).Code developed by Claude