Answer the question
In order to leave comments, you need to log in
How to connect BarcodeScanner to an Apache Cordova project?
Goodnight! I would like to ask you for help with advice and guidance.
I am a web developer, not so long ago I began to understand the development of mobile applications. Since I have a lot of experience in js, I chose visual studio with apache cordova. Everything was fine until it came to connecting plugins, specifically barcodescanner. The problem is that I simply do not understand how to use it ... that is, I installed it using the visual studio functionality. But I can't find extremely banal information anywhere - how can I display the scanner on index.html.
I would be eternally grateful to anyone who could guide me on the path. Thanks in advance!
Answer the question
In order to leave comments, you need to log in
I took it from your link :
(this is javascript)
cordova.plugins.barcodeScanner.scan(
function (result) {
alert("We got a barcode\n" +
"Result: " + result.text + "\n" +
"Format: " + result.format + "\n" +
"Cancelled: " + result.cancelled);
},
function (error) {
alert("Scanning failed: " + error);
}
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question