Search code examples
xamarin.formsbarcodezxing

Xamarin Barcode Scanner


I am trying to do a barcode scanner in Xamarin using ZXing based on this page: https://github.com/Redth/ZXing.Net.Mobile

Unfortunately, the only thing I get is an exception. The code compiles nicely, there are no errors or warnings, I start the application on Samsung S7 and I get an error

Unhandled Exception:
System.Reflection.TargetInvocationException: <Timeout exceeded getting exception details>

Sometimes it shows:

[...] index was outside the bounds of the array [..]

I've been fighting this since yesterday and I have no idea what might be wrong, the videos are working and in my case I have no chance :(

I use vs 2017 Community and packages:

ZXing.Net.Mobile.Forms - 2.4.1

ZXing.Net.Mobile - 2.4.1

Xamarin.Forms - 3.1.0.697729

My project to download if someone would like to see the whole code: https://www.cyrklaf.eu/skaner.rar

I'm missing ideas, like a simple thing, and the problems themselves


Solution

  • I solved this problem. When i change ZXing.Net.Mobile.Forms - 2.4.1 to version 2.3.2 all works fine :)