Hello I'm trying to implement barcode reading in my Xamarin.Forms app according to the documentation.
link , but when I try to run the code below
private async void ExecuteBuscaInventarioCommand()
{
try
{
var scanner = new ZXing.Mobile.MobileBarcodeScanner();
var result = await scanner.Scan();
if (result != null)
Codigo = result.Text;
}
catch (Exception ex)
{
await App.Current.MainPage.DisplayAlert("Ops!", ex.Message, "Ok");
}
}
I get the message System.NotSupportedException: Use the platform specific implementation instead!
In the documentation says for me to add an android support component but the link that is broken ...
In the constructor I put this
MobileBarcodeScanner.Initialize(Application);
but Initialize is not recognized.
Can someone give me a light?