Skip to Content

ReaderManager

com.sladeid.biometric.capture.reader.ReaderManager — discovers, permissions, and tracks the USB reader. Obtained from SladeID.startReaderDiscovery; don’t construct it directly. See Device discovery.

Flows

PropertyTypeDescription
readersStateFlow<List<ReaderInfo>>Connected and permissioned readers; emits on attach/detach/permission change
permissionGrantedStateFlow<Boolean>True once a supported reader has USB permission
readerErrorsSharedFlow<SladeIDError>Vendor init failures (CaptureError) and permission denials (AuthError). A reader that is not plugged in is not an error and is never emitted here

Methods

requestPermissions()

One-shot, user/host-driven USB permission request for every attached supported reader that lacks it. Covers EADAK/Aratek (and SecuGen/BioMini for hosts without a manifest device_filter). Already-permitted devices are skipped, so it never re-prompts. Call it when the host activity receives a USB attach intent or from a “connect” button.

refreshDevices()

Re-probe every supported vendor, rebuild the reader map, and republish readers. Called automatically on attach/detach/permission events; call manually to force a refresh.

Lifecycle

Registers a single broadcast receiver for USB permission/attach/detach on creation. Released via SladeID.release().

[!NOTE] SecuGen and BioMini get permission through the manifest device_filter (the standard attach grant); the SDK deliberately does not re-request those in code (it breaks their vendor-SDK listing). EADAK/Aratek are requested in code.