Cordova Examples

Working code for each barKoder feature on Cordova. Start with the general example, then add what your app needs.

Start here General example A complete scanner screen: the license key, the barcode types to read, the settings and the result. setActiveBarcodeTypessetBarkoderSettingssetBarcodeTypeEnabled Open the example →
declare var Barkoder: any;
import { ElementRef, ViewChild } from '@angular/core';
import { BarkoderResult, BarcodeType } from 'barkoder-cordova/www/BarkoderConfig';

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

  ngAfterViewInit() {
    // Cordova's deviceready: the plugins are loaded (window.Barkoder)
    document.addEventListener('deviceready', () => {
      Barkoder.registerWithLicenseKey("YOUR_LICENSE_KEY");
      setTimeout(() => {
        const boundingRect = this.barkoderViewRef.nativeElement.getBoundingClientRect() as DOMRect;
        Barkoder.initialize(
          Math.round(boundingRect.width),

Scanning modes 4

Hard-to-read codes 2

Documents and IDs 4

Framework integration 4

Not what you need?Search all the docs, or ask the team.