Scanner

class Scanner(val context: Context, val activityAccessor: ActivityAccessor) : NfcScanner, NfcAdapter.ReaderCallback

Constructors

Link copied to clipboard
constructor(context: Context, activityAccessor: ActivityAccessor)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun cancelScan(errorMessage: String?)

Stops scanning previously started via scan or disconnects the established session

Link copied to clipboard
open suspend override fun isEnabled(): Boolean

Check whether NFC adapter is enabled on the device (android only, iOS always enabled)

Link copied to clipboard
open suspend override fun isSupported(): Boolean

Check whether NFC scanning is supported on the device

Link copied to clipboard
open override fun onTagDiscovered(tag: Tag?)
Link copied to clipboard
open suspend override fun scan(message: String?)

Starts scanning for ISO 7816-4 NFC tag

Link copied to clipboard
open suspend override fun setMessage(message: String)

Update UI message on the system NFC scanner overlay (iOS) - previously set via scan

Link copied to clipboard
open suspend override fun transceive(commandApdu: ByteArray): ByteArray

Send APDU request and wait for response APDU