This is a migrated thread and some comments may be shown as answers.

Problem with BarcodeScanner plugin since Graphite update

3 Answers 74 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
pistoleta
Top achievements
Rank 1
pistoleta asked on 02 Jul 2013, 11:27 AM
Hi, im having problems with the barcodescanner plugin,

whenever i call the function:
var scanner = cordova.require("../cordova/plugin/BarcodeScanner"); 

it doesnt work and this is what i see on the console log:
Uncaught module ../cordova/plugin/BarcodeScanner not found (cordova.js:50)

I used to have this in my index.html
<script type="text/javascript" charset="UTF-8" src="Plugins/Barcode Scanner/barcodescanner.js"></script>
But now it doesnt load it.... 

Any suggestions?
Thanks

3 Answers, 1 is accepted

Sort by
0
Accepted
Yavor Georgiev
Telerik team
answered on 02 Jul 2013, 11:42 AM
Hello,

 The BarcodeScanner plugin isn't defined as a module using cordova.define and that's why you can't access it with cordova.require. You can access it by referencing the window.plugins.barcodeScanner object.

Regards,
Yavor Georgiev
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Missed our first webinar, watch it here.
Share feedback and vote for features on our Feedback Portal.
0
pistoleta
Top achievements
Rank 1
answered on 02 Jul 2013, 01:57 PM
Thanks a lot, i changed that code cause i needed it when i was working on phonegap, now i dont need it anymore.
Still, i dont understand why it differs from phonegap if they are supposed to use the same cordova libraries..

Thanks again
0
pistoleta
Top achievements
Rank 1
answered on 02 Jul 2013, 01:59 PM
Thanks a lot!!!
Tags
AppBuilder Windows client
Asked by
pistoleta
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
pistoleta
Top achievements
Rank 1
Share this question
or