0.0.2 • Published 2 years ago

coop-nfc v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

coop-nfc

Plugin for reading card numbers

Install

npm install coop-nfc
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
ParamType
options{ value: string; }

Returns: Promise<{ value: string; }>


waitNFC()

waitNFC() => Promise<void>

startNfcListening()

startNfcListening() => Promise<void>

handleOnNewIntent()

handleOnNewIntent() => Promise<void>

startScan()

startScan() => Promise<ScanResult>

Returns: Promise<ScanResult>


Interfaces

IScanResultWithContent

PropTypeDescriptionSince
hasContenttrueThis indicates whether or not the scan resulted in readable content. When stopping the scan with resolveScan set to true, for example, this parameter is set to false, because no actual content was scanned.1.0.0
contentstringThis holds the content of the nfc if available.1.0.0
cardTypestringThis holds the card type detected.1.0.0
cardNumberstringThis holds the card number detected.1.0.0
expiryDatestringThis holds the expiry date of the card detected.1.0.0
formatstringThis returns format of scan result.2.1.0

IScanResultWithoutContent

PropTypeDescriptionSince
hasContentfalseThis indicates whether or not the scan resulted in readable content. When stopping the scan with resolveScan set to true, for example, this parameter is set to false, because no actual content was scanned.1.0.0
contentThis holds the content of the nfc if available.1.0.0
formatThis returns format of scan result.2.1.0

Type Aliases

ScanResult

IScanResultWithContent | IScanResultWithoutContent

0.0.2

2 years ago

0.0.1

2 years ago