barKoder Installation Guide for Cordova Barcode Reader SDK

Requirements #

Apache Cordova is a cross-platform runtime that lets you build mobile apps using web technologies (HTML, CSS, JavaScript) and run them natively on iOS, Android, or the web. Before you start, ensure the following prerequisites are met:

1. Node.js and npm #

Cordova is installed through npm, which comes bundled with Node.js.

check_box Download Node.js and verify installation:
                node -v  
npm -v
            

2. Text Editor or IDE #

Choose an editor to write your code. Popular options include:

check_box Visual Studio Code
check_box Atom, Sublime Text, or any other editor you prefer.

Cordova projects are often version-controlled using Git.

Download Git and verify installation:

                git --version
            


4. Command Line Interface (CLI) #

Cordova commands are executed via your system’s terminal or command prompt.

Ensure your CLI is working and you’re comfortable running basic commands.

5. Mobile Development SDKs #

Platform-specific SDKs are required to build and run apps:

6. Verify Setup ( optional )  #

Once everything is installed, confirm your environment is ready:

                # Install Cordova globally
npm install -g cordova  

# Verify Cordova installation
cordova -v  

# Create a test project
cordova create myApp com.example.myapp MyApp  
cd myApp  

# Add platforms (optional)
cordova platform add ios  
cordova platform add android  

# Build the app to ensure everything works
cordova build

            

If you see no errors during the build, your setup is complete.

Cordova Project #

1. Install Cordova #

Install Cordova globally so you can access it from anywhere:

                npm install -g cordova
            

2. Add Platforms #

Add the platforms you want to build for:

                cordova platform add ios  
cordova platform add android
            

3. Start Building #

Open your preferred IDE or text editor and begin developing your app using standard web technologies (HTML, CSS, JavaScript). Cordova will wrap these files into native mobile apps.

4. Build and Run #

Use Cordova commands to compile and launch your app:

                cordova build ios  
cordova build android

            

This will generate platform-specific builds that you can test on emulators or physical devices.

Install #

                cordova plugin add barkoder-cordova
            

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 (ex. barkoder-cordova)
  • Move the folder to your liking but not in the project directory
  • Finally:
                cordova plugin add “/your-path/barkoder-cordova”
            

Licensing #

The SDK will scan barcodes even without a license, but results will come with an "UNLICENSED" prefix.
If you want to test the SDK today create a trial license https://barkoder.com/request-quote or just sign-up at barkoder.com/register to access all barKoder features.


Using the plugin #

Angular Example #

In your ts file:

                declare var Barkoder: any;
import { BarcodeType } from 'plugins/barkoder-cordova-plugin/www/BarkoderConfig';

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

  setActiveBarcodeTypes() {
   Barkoder.setBarcodeTypeEnabled(BarcodeType.code128, true);
   Barkoder.setBarcodeTypeEnabled(BarcodeType.ean13, true);
  }

  setBarkoderSettings() {
   Barkoder.setRegionOfInterestVisible(true);
   Barkoder.setRegionOfInterest(5, 5, 90, 90);
   Barkoder.setCloseSessionOnResultEnabled(false);
   Barkoder.setImageResultEnabled(true);
   Barkoder.setBarcodeThumbnailOnResultEnabled(true);
   Barkoder.setBeepOnSuccessEnabled(true);
   Barkoder.setPinchToZoomEnabled(true);
   Barkoder.setZoomFactor(2.0);
  }

  async startScanning() {
   const boundingRect = this.barkoderViewRef.nativeElement.getBoundingClientRect() as DOMRect;
   Barkoder.registerWithLicenseKey("your_license_key");
   await Barkoder.initialize(
       Math.round(boundingRect.width),
       Math.round(boundingRect.height),
       Math.round(boundingRect.x),
       Math.round(boundingRect.y))

   this.setBarkoderSettings();
   this.setActiveBarcodeTypes();

   Barkoder.startScanning((barkoderResult: any) => {
     console.log("Result: " + barkoderResult.textualData);
   }, (err: any) => {
     console.log(err);
   });
  }
            

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;
}
            


Page Contents

History:

close

Version #1194

Published: 08/13/2025 08:36:48

Created On: 08/13/2025 08:36:48

Modified By: Lazar Ilievski

Published Version

Version #1192

Was Published: 08/13/2025 08:27:07

Created On: 08/13/2025 08:27:07

Modified By: Lazar Ilievski

Version #1191

Was Published: 08/13/2025 08:22:59

Created On: 08/13/2025 08:22:59

Modified By: Vladimir Lazarevski

Version #1190

Was Published: 08/13/2025 08:22:29

Created On: 08/13/2025 08:22:29

Modified By: Vladimir Lazarevski

Version #1189

Was Published: 08/13/2025 08:22:17

Created On: 08/13/2025 08:22:17

Modified By: Vladimir Lazarevski

Version #1188

Was Published: 08/13/2025 08:22:05

Created On: 08/13/2025 08:22:05

Modified By: Vladimir Lazarevski

Version #1187

Was Published: 08/13/2025 08:21:40

Created On: 08/13/2025 08:21:40

Modified By: Vladimir Lazarevski

Version #1186

Was Published: 08/13/2025 08:20:51

Created On: 08/13/2025 08:20:50

Modified By: Vladimir Lazarevski

Version #1185

Was Published: 08/13/2025 08:19:40

Created On: 08/13/2025 08:19:40

Modified By: Lazar Ilievski

Version #1184

Was Published: 08/13/2025 08:10:03

Created On: 08/13/2025 08:10:03

Modified By: Lazar Ilievski

Version #1183

Was Published: 08/13/2025 08:07:31

Created On: 08/13/2025 08:07:31

Modified By: Lazar Ilievski

Version #1182

Was Published: 08/13/2025 07:41:07

Created On: 08/13/2025 07:41:06

Modified By: Lazar Ilievski

Version #1146

Was Published: 08/12/2025 20:52:13

Created On: 08/12/2025 20:52:13

Modified By: Lazar Ilievski

Version #784

Was Published: 11/21/2024 13:20:37

Created On: 11/21/2024 13:20:37

Modified By: Vladimir Lazarevski

Version #669

Was Published: 09/09/2024 05:39:13

Created On: 09/09/2024 05:39:13

Modified By: Vladimir Lazarevski

Version #613

Was Published: 09/02/2024 22:32:36

Created On: 09/02/2024 22:32:36

Modified By: Vangel Ivanov

Version #132

Was Published: 07/26/2024 03:08:09

Created On: 07/26/2024 03:08:06

Modified By: Mitko Nikolov

Version #131

Was Published: 08/24/2025 21:45:49

Created On: 07/26/2024 03:07:33

Modified By: Vladimir Lazarevski

Version #130

Was Published: 08/24/2025 21:45:49

Created On: 07/26/2024 03:00:01

Modified By: Vladimir Lazarevski

Version #129

Was Published: 08/24/2025 21:45:49

Created On: 07/26/2024 01:35:17

Modified By: Vladimir Lazarevski

Version #128

Was Published: 08/24/2025 21:45:49

Created On: 07/26/2024 01:34:19

Modified By: Vladimir Lazarevski

Version #37

Was Published: 05/30/2024 11:29:50

Created On: 05/30/2024 11:29:50

Modified By: Trajce Poprizov