https://www.c-sharpcorner.com/UploadFile/020f8f/barcode-scanner-cross-platform-app-using-cordova-in-visual-s/
Following the steps in the above project, I get an app which has the background in stripes, a button which prompts you to scan, but once clicked on, nothing happens. I really need to get this application working for a project of mine, could you please guide me on how to fix this? Thanks.
Amin DodinPosted Nov 15, 2018, 1:06 PM
If you need multi-platform barcode scanning, you can try the Xamarin SDK from LEADTOOLS:
https://www.leadtools.com/sdk/xamarin
The code to perform barcode recognition looks like this:
var imageForRecognition = _rasterImage.Clone();
BarcodeData[] barcodesFound;
OneDBarcodeReadOptions oneDReadOptions = _engine.Reader.GetDefaultOptions(BarcodeSymbology.UPCA).Clone() as OneDBarcodeReadOptions;
var symbologiesToLookFor = new List();
BarcodeSymbology[] oneDSymbologies = { BarcodeSymbology.EAN13, BarcodeSymbology.EAN8, BarcodeSymbology.UPCA, BarcodeSymbology.Code3Of9, BarcodeSymbology.Code128, BarcodeSymbology.USPS4State }; //Dozens more are supported
BarcodeSymbology[] allSymbologies = _engine.Reader.GetAvailableSymbologies();
symbologiesToLookFor.AddRange(oneDSymbologies);
BarcodeReadOptions[] readOptions = { oneDReadOptions };
barcodesFound = _engine.Reader.ReadBarcodes(imageForRecognition, LeadRect.Empty, 0, symbologiesToLookFor.ToArray(), readOptions);
return barcodesFound;
Another way to implement barcode scanning from any platform is to use the barcode web services:
https://www.leadtools.com/sdk/barcode/web-services