barkoder-capacitor
TypeScript icon, indicating that this package has built-in type declarations

1.2.9 • Public • Published

barKoder Barcode Scanner SDK plugin for Capacitor

Enterprise-grade barcode scanner SDK plugin for all Capacitor apps

The barKoder Barcode Scanner SDK Capacitor plugin grants an easy to use solution with a great and completely customizable interface that can be instantly integrated in both iOS and Android apps.

The barKoder Barcode Scanner SDK will fully transform the user's smartphones and tablets that deploy your Enterprise and Consumer apps into rugged barcode scanning devices without the need to procure and maintain expensive and sluggish hardware devices that have a very short life span.

Even though the barKoder barcode scanner SDK is a relatively new product, it is already more advanced than other competitor API's. Its robust barcode reading engine can be used to read the content of the most widely used barcodes with lightning fast speed and unprecedented recognition rate:

1D - Codabar, Code 11, Code 25, Code 39, Code 93, Code 128, EAN-8, EAN-13, Interleaved 2 of 5, ITF-14, MSI Plessey, Pharmacode, Telepen, UPC-A & UPC-E 2D - Aztec Code, Aztec Compact, Data Matrix, DotCode, PDF417, Micro PDF417, QR Code & Micro QR Code

The barKoder SDK features multiple algorithms that handle a wide variety of barcode scanning scenarios with unprecedented performance in terms of speed and success rate:

  • 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.

You can check out our free demo app Barcode Scanner by barKoder available both via Apple App Store & Google Play Store.

Documentation

You can find full documentation about the barKoder Barcode Reader SDK here: https://docs.barkoder.com/en/capacitor-installation

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 sales@barkoder.com

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 Portal. After registering and logging into your account, you only need to submit a Support Issue form. Alternatively, you can contact us by email via support@barkoder.com.

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:

  1. 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.
  2. 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.
  3. Git:
    • Capacitor projects are often managed with Git, so having Git installed on your machine is recommended.
  4. 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.
  5. 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:
  6. Install Capacitor:
    npm install -g @capacitor/cli
  7. Add Platforms:
    npx cap add ios
    npx cap add android
  8. Open IDE and Start Coding:
    • Open your chosen IDE or text editor and start building your app using web technologies.
  9. 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 sync

Install 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, BarcodeType } from 'barkoder-capacitor'

@ViewChild('barkoderView') barkoderViewRef!: ElementRef;

   constructor() {
     Barkoder.addListener('barkoderResultEvent', (barkoderResult: any) => {
       console.log('barkoderResultEvent was fired');
       console.log("Result: " + barkoderResult.textualData);
     });
   }

   setActiveBarcodeTypes() {
    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.setCloseSessionOnResultEnabled({ enabled: false});
    Barkoder.setImageResultEnabled({ enabled: true});
    Barkoder.setBarcodeThumbnailOnResultEnabled({ enabled: true});
    Barkoder.setBeepOnSuccessEnabled({ enabled: true});
    Barkoder.setPinchToZoomEnabled({ enabled: true});
    Barkoder.setZoomFactor({ value: 2.0 });
   }

   async startScanning() {
      const boundingRect = this.barkoderViewRef.nativeElement.getBoundingClientRect() as DOMRect;
      Barkoder.registerWithLicenseKey({licenseKey: "your_license_key"});
      await 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();
      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;
}

API

initialize(...)

initialize(options: { width: number; height: number; x: number; y: number; }) => Promise<any>
Param Type
options { width: number; height: number; x: number; y: number; }

Returns: Promise<any>


registerWithLicenseKey(...)

registerWithLicenseKey(options: { licenseKey: string; }) => Promise<any>
Param Type
options { licenseKey: string; }

Returns: Promise<any>


setZoomFactor(...)

setZoomFactor(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setFlashEnabled(...)

setFlashEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


startCamera()

startCamera() => Promise<any>

Returns: Promise<any>


startScanning()

startScanning() => Promise<any>

Returns: Promise<any>


stopScanning()

stopScanning() => Promise<any>

Returns: Promise<any>


pauseScanning()

pauseScanning() => Promise<any>

Returns: Promise<any>


setLocationLineColor(...)

setLocationLineColor(options: { value: string; }) => Promise<any>
Param Type
options { value: string; }

Returns: Promise<any>


setLocationLineWidth(...)

setLocationLineWidth(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setRoiLineColor(...)

setRoiLineColor(options: { value: string; }) => Promise<any>
Param Type
options { value: string; }

Returns: Promise<any>


setRoiLineWidth(...)

setRoiLineWidth(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setRoiOverlayBackgroundColor(...)

setRoiOverlayBackgroundColor(options: { value: string; }) => Promise<any>
Param Type
options { value: string; }

Returns: Promise<any>


setCloseSessionOnResultEnabled(...)

setCloseSessionOnResultEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setImageResultEnabled(...)

setImageResultEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setLocationInImageResultEnabled(...)

setLocationInImageResultEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setRegionOfInterest(...)

setRegionOfInterest(options: { left: number; top: number; width: number; height: number; }) => Promise<any>
Param Type
options { left: number; top: number; width: number; height: number; }

Returns: Promise<any>


setThreadsLimit(...)

setThreadsLimit(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setLocationInPreviewEnabled(...)

setLocationInPreviewEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setPinchToZoomEnabled(...)

setPinchToZoomEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setRegionOfInterestVisible(...)

setRegionOfInterestVisible(options: { value: boolean; }) => Promise<any>
Param Type
options { value: boolean; }

Returns: Promise<any>


setBarkoderResolution(...)

setBarkoderResolution(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setBeepOnSuccessEnabled(...)

setBeepOnSuccessEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setVibrateOnSuccessEnabled(...)

setVibrateOnSuccessEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


showLogMessages(...)

showLogMessages(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setBarcodeTypeLengthRange(...)

setBarcodeTypeLengthRange(options: { type: number; min: number; max: number; }) => Promise<any>
Param Type
options { type: number; min: number; max: number; }

Returns: Promise<any>


setEncodingCharacterSet(...)

setEncodingCharacterSet(options: { value: string; }) => Promise<any>
Param Type
options { value: string; }

Returns: Promise<any>


setDecodingSpeed(...)

setDecodingSpeed(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setFormattingType(...)

setFormattingType(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setCode11ChecksumType(...)

setCode11ChecksumType(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setMsiChecksumType(...)

setMsiChecksumType(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setCode39ChecksumType(...)

setCode39ChecksumType(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setBarcodeTypeEnabled(...)

setBarcodeTypeEnabled(options: { type: number; enabled: boolean; }) => Promise<any>
Param Type
options { type: number; enabled: boolean; }

Returns: Promise<any>


setMulticodeCachingEnabled(...)

setMulticodeCachingEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setMulticodeCachingDuration(...)

setMulticodeCachingDuration(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setMaximumResultsCount(...)

setMaximumResultsCount(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setBarcodeThumbnailOnResultEnabled(...)

setBarcodeThumbnailOnResultEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setDuplicatesDelayMs(...)

setDuplicatesDelayMs(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setThresholdBetweenDuplicatesScans(...)

setThresholdBetweenDuplicatesScans(options: { value: number; }) => Promise<any>
Param Type
options { value: number; }

Returns: Promise<any>


setUpcEanDeblurEnabled(...)

setUpcEanDeblurEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setMisshaped1DEnabled(...)

setMisshaped1DEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


setEnableVINRestrictions(...)

setEnableVINRestrictions(options: { value: boolean; }) => Promise<any>
Param Type
options { value: boolean; }

Returns: Promise<any>


setDatamatrixDpmModeEnabled(...)

setDatamatrixDpmModeEnabled(options: { enabled: boolean; }) => Promise<any>
Param Type
options { enabled: boolean; }

Returns: Promise<any>


configureBarkoder(...)

configureBarkoder(options: { barkoderConfig: BarkoderConfig; }) => Promise<any>
Param Type
options { barkoderConfig: BarkoderConfig; }

Returns: Promise<any>


isFlashAvailable()

isFlashAvailable() => Promise<any>

Returns: Promise<any>


isCloseSessionOnResultEnabled()

isCloseSessionOnResultEnabled() => Promise<any>

Returns: Promise<any>


isImageResultEnabled()

isImageResultEnabled() => Promise<any>

Returns: Promise<any>


isLocationInImageResultEnabled()

isLocationInImageResultEnabled() => Promise<any>

Returns: Promise<any>


isLocationInPreviewEnabled()

isLocationInPreviewEnabled() => Promise<any>

Returns: Promise<any>


isPinchToZoomEnabled()

isPinchToZoomEnabled() => Promise<any>

Returns: Promise<any>


isRegionOfInterestVisible()

isRegionOfInterestVisible() => Promise<any>

Returns: Promise<any>


isBeepOnSuccessEnabled()

isBeepOnSuccessEnabled() => Promise<any>

Returns: Promise<any>


isVibrateOnSuccessEnabled()

isVibrateOnSuccessEnabled() => Promise<any>

Returns: Promise<any>


getVersion()

getVersion() => Promise<any>

Returns: Promise<any>


getLocationLineColorHex()

getLocationLineColorHex() => Promise<any>

Returns: Promise<any>


getRoiLineColorHex()

getRoiLineColorHex() => Promise<any>

Returns: Promise<any>


getRoiOverlayBackgroundColorHex()

getRoiOverlayBackgroundColorHex() => Promise<any>

Returns: Promise<any>


getMaxZoomFactor()

getMaxZoomFactor() => Promise<any>

Returns: Promise<any>


getLocationLineWidth()

getLocationLineWidth() => Promise<any>

Returns: Promise<any>


getRoiLineWidth()

getRoiLineWidth() => Promise<any>

Returns: Promise<any>


getRegionOfInterest()

getRegionOfInterest() => Promise<any>

Returns: Promise<any>


getBarcodeTypeLengthRange(...)

getBarcodeTypeLengthRange(options: { type: number; }) => Promise<any>
Param Type
options { type: number; }

Returns: Promise<any>


getMsiChecksumType()

getMsiChecksumType() => Promise<any>

Returns: Promise<any>


getCode39ChecksumType()

getCode39ChecksumType() => Promise<any>

Returns: Promise<any>


getCode11ChecksumType()

getCode11ChecksumType() => Promise<any>

Returns: Promise<any>


getEncodingCharacterSet()

getEncodingCharacterSet() => Promise<any>

Returns: Promise<any>


getDecodingSpeed()

getDecodingSpeed() => Promise<any>

Returns: Promise<any>


getFormattingType()

getFormattingType() => Promise<any>

Returns: Promise<any>


getThreadsLimit()

getThreadsLimit() => Promise<any>

Returns: Promise<any>


getMaximumResultsCount()

getMaximumResultsCount() => Promise<any>

Returns: Promise<any>


getDuplicatesDelayMs()

getDuplicatesDelayMs() => Promise<any>

Returns: Promise<any>


isBarcodeTypeEnabled(...)

isBarcodeTypeEnabled(options: { type: number; }) => Promise<any>
Param Type
options { type: number; }

Returns: Promise<any>


getMulticodeCachingEnabled()

getMulticodeCachingEnabled() => Promise<any>

Returns: Promise<any>


getMulticodeCachingDuration()

getMulticodeCachingDuration() => Promise<any>

Returns: Promise<any>


isUpcEanDeblurEnabled()

isUpcEanDeblurEnabled() => Promise<any>

Returns: Promise<any>


isMisshaped1DEnabled()

isMisshaped1DEnabled() => Promise<any>

Returns: Promise<any>


isBarcodeThumbnailOnResultEnabled()

isBarcodeThumbnailOnResultEnabled() => Promise<any>

Returns: Promise<any>


getThresholdBetweenDuplicatesScans()

getThresholdBetweenDuplicatesScans() => Promise<any>

Returns: Promise<any>


isVINRestrictionsEnabled()

isVINRestrictionsEnabled() => Promise<any>

Returns: Promise<any>


getBarkoderResolution()

getBarkoderResolution() => Promise<any>

Returns: Promise<any>


Package Sidebar

Install

npm i barkoder-capacitor

Weekly Downloads

5

Version

1.2.9

License

MIT

Unpacked Size

13.6 MB

Total Files

72

Last publish

Collaborators

  • barkoder