
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@capacitor/barcode-scanner
Advanced tools
Capacitor plugin using Outsystems Barcode libs
npm install @capacitor/barcode-scanner
npx cap sync
The barcode scanner plugin requires a minimum Android SDK target of 26. This is higher than the default that comes with your Capacitor application. You can update this value in your android/variables.gradle
file.
ext {
minSdkVersion = 26
}
Note: Android with ZXING
scanning library supports all formats, while MLKIT
supports all but MAXICODE
, RSS_14
, RSS_EXPANDED
and UPC_EAN_EXTENSION
- using one of these in hint
will default to scanning any format.
The barcode scanner uses the camera on the device. Ensure you configure the Privacy - Camera Usage Description in your Info.plist file so that your application can access the device's camera.
Note: iOS supports all formats but MAXICODE
and UPC_EAN_EXTENSION
- using them in hint
will default to scanning any format. Also, Apple Vision does not distinguish between UPC_A
and EAN_13
, so specifying one of these in hint
will allow to scan both.
Interface defining the contract for a plugin capable of scanning barcodes. Requires implementation of the scanBarcode method, which initiates a barcode scan with given options.
scanBarcode(options: CapacitorBarcodeScannerOptions) => Promise<CapacitorBarcodeScannerScanResult>
Param | Type |
---|---|
options | CapacitorBarcodeScannerOptions |
Returns: Promise<CapacitorBarcodeScannerScanResult>
Defines the structure of the result returned from a barcode scan.
{ ScanResult: string; format: CapacitorBarcodeScannerTypeHint; }
Extends supported formats from Html5Qrcode with a special 'ALL' option, indicating support for all barcode types. Type definition combining Html5QrcodeSupportedFormats and OSBarcodeTypeHintALLOption to represent the hint for the type of barcode to be scanned.
Html5QrcodeSupportedFormats | CapacitorBarcodeScannerTypeHintALLOption
Defines the options for configuring a barcode scan.
{ hint: CapacitorBarcodeScannerTypeHint; scanInstructions?: string; scanButton?: boolean; scanText?: string; cameraDirection?: CapacitorBarcodeScannerCameraDirection; scanOrientation?: CapacitorBarcodeScannerScanOrientation; android?: { scanningLibrary?: CapacitorBarcodeScannerAndroidScanningLibrary; }; web?: { showCameraSelection?: boolean; scannerFPS?: number; }; }
Members | Value |
---|---|
QR_CODE | 0 |
AZTEC | 1 |
CODABAR | 2 |
CODE_39 | 3 |
CODE_93 | 4 |
CODE_128 | 5 |
DATA_MATRIX | 6 |
MAXICODE | 7 |
ITF | 8 |
EAN_13 | 9 |
EAN_8 | 10 |
PDF_417 | 11 |
RSS_14 | 12 |
RSS_EXPANDED | 13 |
UPC_A | 14 |
UPC_E | 15 |
UPC_EAN_EXTENSION | 16 |
Members | Value |
---|---|
ALL | 17 |
Members | Value |
---|---|
BACK | 1 |
FRONT | 2 |
Members | Value |
---|---|
PORTRAIT | 1 |
LANDSCAPE | 2 |
ADAPTIVE | 3 |
Members | Value |
---|---|
ZXING | 'zxing' |
MLKIT | 'mlkit' |
FAQs
Capacitor plugin using Outsystems Barcode libs
The npm package @capacitor/barcode-scanner receives a total of 11,117 weekly downloads. As such, @capacitor/barcode-scanner popularity was classified as popular.
We found that @capacitor/barcode-scanner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 17 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.