David wyatt
Posts: 0
Joined: Mon Sep 15, 2014 7:12 pm

how to activate barcode scanner through javascript

Hi,

Im trying to activate the barcode scanner through javascript and i cant find the right command.

Please help.

Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

how to activate barcode scanner through javascript

nameOfBarcodeService.execute({});

Where "nameOfBarcodeService" is the name you assigned when you added the service to the screen...

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

how to activate barcode scanner through javascript

David,

Here is two ways to run barcode scaner.

  1. Use Appery.io service.

    pre

    //Where "barcodeScanner1" is your barcode scanner service datasource on that page.
    barcodeScanner1.execute();

    /pre

  2. Use barcode plugin directly:

    pre

    BarcodeScanner.scan(function (result) {
    console.log("scaned");
    }, function (error) {
    console.log("error");
    }
    );

    /pre

    More info about this approach here: https://github.com/phonegap-build/Bar...

    Note: for these two ways you need to add "barcode scanner" to your app via "Create new" interface.

    Regards.

Argia
Posts: 0
Joined: Thu May 21, 2015 6:48 am

how to activate barcode scanner through javascript

Hi, is there a way to do this with AngularJS/Bootstrap at the moment?

Thanks!

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

how to activate barcode scanner through javascript

Hello,

There is no build-in barcode scanner for AngularJS/Bootstrap at the moment.

Return to “Issues”