Capacitor Examples

Working code for each barKoder feature on Capacitor. 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 →
import { ElementRef, ViewChild } from '@angular/core';
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}`);
         });
       }

Scanning modes 4

Hard-to-read codes 2

Documents and IDs 4

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