Skip to Content
Android SDKConceptsDevice discovery

Device discovery

The SDK finds, permissions, and tracks the USB reader so your app doesn’t touch UsbManager directly. This is handled by ReaderManager, returned from sdk.startReaderDiscovery().

The flow-driven model

ReaderManager exposes three flows you collect from your UI:

  • readers: StateFlow<List<ReaderInfo>> — currently connected and permissioned readers. Emits on attach, detach, and permission changes.
  • permissionGranted: StateFlow<Boolean> — true once a supported reader has USB permission.
  • readerErrors: SharedFlow<SladeIDError> — discovery/permission failures (vendor init CaptureError, permission-denial AuthError).

[!NOTE] A reader that is simply not plugged in is not an error — it never appears on readerErrors. That lets you show an accurate “no reader connected” message instead of guessing from an empty readers list.

Lifecycle

On startReaderDiscovery() the manager:

  1. Registers a single broadcast receiver for USB permission, attach, and detach events.
  2. Fast-paths any already-permitted supported device (fixes the “unplug/replug or restart” case).
  3. Requests permission for the rest.
  4. On any grant/attach/detach, re-probes every supported vendor by construction and republishes readers.

Only one reader is expected at a time (USB bus power), so a full re-probe per event is cheap.

Permissions

USB permission is a system dialog. Two paths grant it:

  • Manifest device_filter — when the reader is attached, Android shows the permission dialog and routes the attach intent to your activity. This is the standard grant for SecuGen and BioMini. Re-requesting those in code breaks their vendor-SDK listing, so the SDK deliberately doesn’t.
  • manager.requestPermissions() — a one-shot, user-driven request for every attached supported reader that lacks permission (covers EADAK / Aratek, and SecuGen/BioMini for hosts that don’t wire a device_filter). Call it when your activity receives a USB attach intent or from a “connect” button. Already-permitted devices are skipped, so it never re-prompts.

Reader auto-detect on customized Android builds

Some manufacturer-customized Android builds deliver USB_DEVICE_ATTACHED only to a manifest-registered <receiver>, not a runtime one. If auto-detect works on stock Android but not on a particular device, register a manifest <receiver> for the USB attach action and route it to a discovery refresh (requestPermissions() + refreshDevices()).

Supported vendors

ReaderManager probes SecuGen, Suprema BioMini, and EADAK / Aratek TrustFinger by default, each behind the common FingerprintReader abstraction. Vendor IDs and models are in the device support matrix.

Used in