@monaca/capacitor-nfc-reader
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-beta.1 • Public • Published

@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 sync

API

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'

Readme

Keywords

Package Sidebar

Install

npm i @monaca/capacitor-nfc-reader

Weekly Downloads

18

Version

0.0.1-beta.1

License

MIT

Unpacked Size

34.7 kB

Total Files

27

Last publish

Collaborators

  • knight9999
  • masahirotanaka
  • yongsopheaktra
  • monaca-user
  • erisu
  • asial-hirose
  • atakuya
  • asialfujiwara