@monaca/capacitor-nfc-reader
v0.0.1-beta.1
Published
A Capacitor plugin for reading NFC tags on Android and iOS devices
Readme
@monaca/capacitor-nfc-reader
A Capacitor plugin for reading NFC tags on Android and iOS devices
Install
npm install @monaca/capacitor-nfc-reader
npx cap syncAPI
initialize()startScanning()stopScanning()addListener('nfcTagDetected', ...)addListener('nfcError', ...)removeAllListeners()- Interfaces
- Enums
initialize()
initialize() => Promise<{ value: boolean; }>Returns: Promise<{ value: boolean; }>
startScanning()
startScanning() => Promise<void>stopScanning()
stopScanning() => Promise<void>addListener('nfcTagDetected', ...)
addListener(eventName: 'nfcTagDetected', listenerFunc: (tag: NFCTag) => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | ----------------------------------------------------------- |
| eventName | 'nfcTagDetected' |
| listenerFunc | (tag: NFCTag) => void |
Returns: Promise<PluginListenerHandle>
addListener('nfcError', ...)
addListener(eventName: 'nfcError', listenerFunc: (error: NFCError) => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | ----------------------------------------------------------------- |
| eventName | 'nfcError' |
| listenerFunc | (error: NFCError) => void |
Returns: Promise<PluginListenerHandle>
removeAllListeners()
removeAllListeners() => Promise<void>Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
NFCTag
| Prop | Type |
| ---------- | ------------------------------------------------- |
| id | string |
| type | NFCTagType |
NFCError
| Prop | Type |
| ------------- | ------------------- |
| code | string |
| message | string |
Enums
NFCTagType
| Members | Value |
| -------------- | ----------------------- |
| MIFARE | 'MIFARE' |
| FeliCa | 'FeliCa' |
| ISO15693 | 'ISO15693' |
| ISO7816 | 'ISO7816' |
| Unknown | 'Unknown' |
