Nfc Read Manager
Android implementation of NfcReadManager. This class handles NFC tag scanning using the Android NFC Adapter in Reader Mode.
Manager class for handling NFC reading operations.
This is an expected class with platform-specific implementations for Android and iOS. It manages the NFC scanning process, provides results via a StateFlow, and handles the UI (like bottom sheets on Android or native dialogs on iOS).
iOS implementation of NfcReadManager. This class handles NFC tag scanning using CoreNFC's NFCTagReaderSession.
Properties
A StateFlow that emits the current NfcReadResult during the scanning process.
A StateFlow that emits the current NfcReadResult of the NFC scanning process.
A StateFlow that emits the current NfcReadResult during the scanning process.
Functions
Callback triggered when an NFC tag is discovered. Parses the tag data and updates nfcResult.
A Composable function that registers the manager with the current Activity and Context. It handles the lifecycle of the NFC adapter and displays the scan bottom sheet when active.
A Composable function that registers the manager within the Compose UI hierarchy. This is typically used to handle lifecycle events and show scanning-related UI components.
A Composable function that registers the manager. On iOS, this is currently a no-op as the scanning UI is handled by the system.
Starts the NFC scanning process. Checks if the NFC adapter is available and enabled, then enables Reader Mode.
Starts the NFC scanning process.
Starts the NFC scanning process by initiating an NFCTagReaderSession. Checks if NFC reading is available on the device before starting.
Stops the NFC scanning process and disables Reader Mode.
Stops the NFC scanning process.
Stops the NFC scanning process and invalidates the current session.
Invoked when one or more NFC tags are detected.
Invoked when the session is invalidated, either by the user or due to an error.