barkoder-capacitor
v1.6.8
Published
Capacitor plugin that connects to barkoderSDK which helps users scan barcodes with mobile devices
Maintainers
Readme
barKoder Barcode Scanner SDK for Capacitor
Add an enterprise-grade barcode scanning engine in your Capacitor app
Integrating the barKoder Barcode Scanner SDK into your Enterprise or Consumer-facing mobile apps will instantly transform your user's smarphones and tablets into rugged barcode scanning devices without the need to procure and maintain expensive and sluggish hardware devices that have a very short life span.
barKoder is a cutting-edge data capture solution built for modern enterprise use cases — delivering AI-powered computer vision, ultra-fast recognition, and industry-leading performance even in the most challenging real-world conditions.
Why barKoder?
barKoder is a production-ready scanning engine trusted across industries such as:
- Logistics & Supply Chain
- Manufacturing & Direct Part Marking (DPM)
- Retail & Self-Checkout
- Automotive & VIN Capture
- Identity Verification (MRZ + OCR)
Key barKoder SDK capabilities include:
- DPM Mode - Specially designed scanning template for decoding Data Matrix barcodes engraved using any Direct Part Marking (DPM) technique;
- MatrixSight - Proprietary algorithm that can successfully scan QR Codes or Data Matrix barcodes even when they are missing their finder, timing and/or alignment patterns, even part of the data elements;
- Segment Decoding - The advanced barcode localization techniques implemented into the barKoder SDK grants an ability to recognize 1D barcodes that have significant deformations along their Z axis, getting especially handy when trying to recognize barcodes found on test tubes, bottles and other surfaces with rounded, curved, hollowed or otherwise irregular shapes;
- VIN Barcode Scanning Mode - The most advanced VIN barcode scanning mode on the market, utilizing all the special algorithms of the barKoder SDK leading to the ultimate scanning experience of any kind of barcodes used for embedding Vehicle Identification Numbers, including Code 39, Code 128, QR Code and Data Matrix;
- DeBlur Mode - Whether there's lens, motion or focus blur present in EAN or UPC barcodes, the barKoder DeBlur Mode alleviates it fully and doesn't allow the scanning experience to suffer;
- PDF417-LineSight - The robust PDF417 barcode scanner SDK that is offered by barKoder can detect even the most severely damaged PDF417 codes, including missing their start and stop patterns, stop row indicators or even entire data columns, making it the sublime choice for apps that need to reliably scan US or Canadian driver's licenses, South African vehicle license discs or driver's licenses, as well as various types of ID's such as Military, Argentinian, Colombian or South African Smart ID Cards.
- Barch MultiScan - Want to scan multiple barcodes regardless of type and density continuously? Look no further than barKoder's Batch MultiScan feature, whose result caching and location reconstruction techniques provide excellent user-experience and results.
- Continuous Scanning - barKoder’s advanced engine seamlessly captures data from multiple barcodes in real-time, enabling uninterrupted scanning workflows that boost efficiency and accuracy. Unlike traditional methods that require individual scans for each barcode, barKoder’s continuous scanning technology ensures faster data collection and processing, making it an ideal choice for high-volume scanning environments where speed and precision are critical.
- MRZ Scanning - The barKoder MRZ Scanning SDK enables fast and accurate extraction of Machine Readable Zone (MRZ) data from passports, ID cards, and travel documents. Built with advanced computer vision and OCR technology, it delivers reliable performance even in challenging conditions such as low light, glare, or motion.
- Augmented Reality Overlays - barKoder’s Augmented Reality overlays bring barcode data to life by displaying real-time, contextual information directly on top of scanned items. From inventory counts to expiration dates and custom labels, your users see what matters—instantly, visually, and interactively.
Supported Barcode Symbologies
barKoder supports 30+ symbologies including:
1D - Codabar, Code 11, Code 25, Code 32, Code 39, Code 93, Code 128, DataBar, EAN-8, EAN-13, GS1 Composite, Interleaved 2 of 5, ITF-14, MSI Plessey, Postal Barcodes, Telepen, UPC-A & UPC-E
2D - Aztec Code, Aztec Compact, Data Matrix, PDF417, MaxiCode, Micro PDF417, DotCode, QR Code & Micro QR Code
Demo Apps
Try barKoder in action:
iOS Demo App: https://apps.apple.com/us/app/barkoder-scanner/id6443715409
Android Demo App: https://play.google.com/store/apps/details?id=com.barkoder.demoscanner
Official Capacitor Documentation
The Capacitor SDK is fully documented here:
Installation Guide
https://barkoder.com/docs/v1/capacitor/capacitor-installation
General Example
https://barkoder.com/docs/v1/capacitor/capacitor-examples/general-example
Capacitor API Reference
https://barkoder.com/docs/v1/capacitor/capacitor-sdk-api-reference
Capacitor Examples
https://barkoder.com/docs/v1/capacitor/capacitor-examples
Trial License
If you run the barKoder Barcode Scanner SDK without a valid trial or production license, all results upon successful barcode scans will be partially masked by asterisks (*). You can get a trial license simply by registering on the barKoder Portal and utilizing the self-service for Evaluation License Generation! Each trial license will be good for an initial duration of 30 days and can be deployed to up to 25 devices. For any custom requirements, contact our sales team via [email protected]
Note that a trial license is only supposed to be utilized in a development or staging environment. IF you decide to publish a trial license along with your app to the App Store, Play Store or any public store we won't be held accountable for any potential consequences.
Free Developer Support
Our support is completely free for integration or testing purposes and granted through the barKoder Developer Portal. After registering and logging into your account, you only need to submit a Support Issue. Alternatively, you can contact us by email via [email protected]
Requirements
Capacitor is a cross-platform app runtime that makes it easy to build web apps that run natively on iOS, Android and the web. To get started with building apps using Capacitor, you'll need to meet certain requirements:
- Node.js and npm:
- Ensure you have Node.js installed on your machine. Capacitor requires Node.js version 10 or later.
- npm (Node Package Manager) is also required. It usually comes with Node.js.
- Text Editor or IDE:
- Choose a text editor or an integrated development environment (IDE) for coding. Popular choices include Visual Studio Code, Atom, or any other editor of your preference.
- Git:
- Capacitor projects are often managed with Git, so having Git installed on your machine is recommended.
- Command Line Interface (CLI):
- Capacitor commands are executed via the command line. Make sure you have a command line interface (CLI) installed and accessible on your system.
- Mobile Development SDKs:
- To build and run apps on specific platforms, you'll need the corresponding SDKs:
- For iOS development: Xcode (available on macOS)
- For Android development: Android Studio Capacitor project. Here are the basic steps:
- To build and run apps on specific platforms, you'll need the corresponding SDKs:
- Install Capacitor:
npm install -g @capacitor/cli - Add Platforms:
npx cap add ios npx cap add android - Open IDE and Start Coding:
- Open your chosen IDE or text editor and start building your app using web technologies.
- Build and Run:
- Use Capacitor commands to build and run your app on different platforms.
npx cap open ios npx cap open android
These steps provide a basic overview, and the Capacitor documentation may have been updated since our last knowledge update. It's always a good idea to refer to the official Capacitor documentation for the latest and most accurate information: Capacitor Documentation.
Install
npm install barkoder-capacitor
npx cap syncInstall Manually
If you would like to install from a local folder you will need to follow these steps:
- Download zip
- Unpack zip file
- Rename folder to your liking
- Paste the folder in app directory ex. myApp/barkoder-capacitor (this is the new name of the download plugin folder)
- Finally:
npm install “/your-path/myApp/barkoder-capacitor”Using the plugin
Angular
In your ts file:
import { Barkoder, BarkoderResult, BarcodeType } from 'barkoder-capacitor'
@ViewChild('barkoderView') barkoderViewRef!: ElementRef;
constructor() {
Barkoder.addListener('barkoderResultEvent', (data: any) => {
console.log('barkoderResultEvent was fired');
const barkoderResult = new BarkoderResult(data);
if (barkoderResult) {
barkoderResult.decoderResults.forEach((result, index) => {
console.log(`Result ${index + 1}: ${result.textualData}`);
});
}
});
}
ngAfterViewInit() {
Barkoder.registerWithLicenseKey({ licenseKey: "YOUR_LICENSE_KEY" });
setTimeout(() => {
const boundingRect = this.barkoderViewRef.nativeElement.getBoundingClientRect() as DOMRect;
Barkoder.initialize({
width: Math.round(boundingRect.width),
height: Math.round(boundingRect.height),
x: Math.round(boundingRect.x),
y: Math.round(boundingRect.y),
});
this.setBarkoderSettings();
this.setActiveBarcodeTypes();
}, 200);
}
setActiveBarcodeTypes() {
Barkoder.setBarcodeTypeEnabled({ type: BarcodeType.qr, enabled: true });
Barkoder.setBarcodeTypeEnabled({ type: BarcodeType.code128, enabled: true });
Barkoder.setBarcodeTypeEnabled({ type: BarcodeType.ean13, enabled: true });
}
setBarkoderSettings() {
Barkoder.setRegionOfInterestVisible({value: true});
Barkoder.setRegionOfInterest({ left: 5, top: 5, width: 90, height: 90 });
Barkoder.setImageResultEnabled({ enabled: true});
Barkoder.setBarcodeThumbnailOnResultEnabled({ enabled: true});
}
startScanning() {
Barkoder.startScanning();
}In your HTML file add the barkoderView div id:
<div id="barkoderView" #barkoderView >In your scss file set the desired barkoderView height:
#barkoderView {
height: 400px;
}