0

We have a SharePoint list with bar codes enabled. We also have a Xamarin App that need to scan printed bar codes and then find values in the SharePoint list that matches the value. But how do you get the value from a given scanned bar code in a Xamarin app that matches the standard SharePoint Online uses?

0

SharePoint generates a classic Code 128 Barcode

Modern list example enter image description here

The same SharePoint barcode when we click on it:

enter image description here

To read the Code 128 in Xamarin, use any of the C# Barcode reading library. For example, ZXing

Small example decoding a barcode inside a bitmap (.Net 2.0/3.5/4.x). Source

// create a barcode reader instance
IBarcodeReader reader = new BarcodeReader();
// load a bitmap
var barcodeBitmap = (Bitmap)Image.LoadFrom("C:\\sample-barcode-image.png");
// detect and decode the barcode inside the bitmap
var result = reader.Decode(barcodeBitmap);
// do something with the result
if (result != null)
{
   txtDecoderType.Text = result.BarcodeFormat.ToString();
   txtDecoderContent.Text = result.Text;
}
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.