0.0.2 • Published 3 years ago
coop-nfc v0.0.2
coop-nfc
Plugin for reading card numbers
Install
npm install coop-nfc
npx cap syncAPI
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
|---|---|
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
| Prop | Type | Description | Since |
|---|---|---|---|
hasContent | true | This 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 |
content | string | This holds the content of the nfc if available. | 1.0.0 |
cardType | string | This holds the card type detected. | 1.0.0 |
cardNumber | string | This holds the card number detected. | 1.0.0 |
expiryDate | string | This holds the expiry date of the card detected. | 1.0.0 |
format | string | This returns format of scan result. | 2.1.0 |
IScanResultWithoutContent
| Prop | Type | Description | Since |
|---|---|---|---|
hasContent | false | This 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 |
content | This holds the content of the nfc if available. | 1.0.0 | |
format | This returns format of scan result. | 2.1.0 |
Type Aliases
ScanResult
IScanResultWithContent | IScanResultWithoutContent