2.3.3 • Published 2 months ago

capacitor-barcode-scanner v2.3.3

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

capacitor-barcode-scanner

Simple Barcode scanner for capacitor, shows popup camera view to scan. Supports code 128 and QR Uses Google MLKit in android, and AVFoundation on iOS

Install

npm i capacitor-barcode-scanner
npx cap sync

Capacitor Compatibility

Plugin VersionCapacitor Version
0.0.2Capacitor 3
1.0.1Capacitor 5
2.0.0Capacitor 5
2.1.1Capacitor 5
2.1.2Capacitor 5
2.2.0Capacitor 5
2.3.0Capacitor 6
2.3.1Capacitor 6
2.3.3Capacitor 6

Changelog

version 1.0.1 updated for capacitor 5 version 2.1.2 updated MLKit version in android version 2.3.0 capacitor 6 support version 2.3.3 Fix Android ladybug build

iOS

In XCode -> App info.plist add key NSCameraUsageDescription

Web implementation on 2.3.1

On versión 2.3.1+ the web versión will call an input image for QR Only detection using JSQR, this feature is experimental and for debuging purposes

API

scan()

scan() => Promise<ScanResult>

Start scan screen This promise will fail if permission for camera is denied

Returns: Promise<ScanResult>


multiScan(...)

multiScan(opts?: MultiScanOptions | undefined) => Promise<MultiScanResult>

Start scan screen the difference vs scan is this will not close automatically, and continues scannning multiple codes ! Added in v1.1.1

ParamType
optsMultiScanOptions

Returns: Promise<MultiScanResult>


Interfaces

ScanResult

Represents a Scan Result

PropTypeDescription
resultbooleansucess status, its true when scanner got code
codestringscanned code

MultiScanResult

Represents a Multiple scan result

PropType
resultboolean
countnumber
codesstring[]

MultiScanOptions

PropTypeDescription
maxScansnumberMax quantity of codes to scan, when reached the amount activity or viewcontroller will close and return the scanned codes, it defaults to 9999
2.3.3

2 months ago

2.3.2

4 months ago

2.3.1

4 months ago

2.3.0

6 months ago

2.2.0

7 months ago

2.1.2

11 months ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago