Zxing net mobile wont work on Universal Windows project

iriliasirilias FRMember
edited June 2016 in Xamarin.Forms

Hello,
I am having a hard time making the Zxing net mobile 2.1.0-beta library to work with Universal Windows Project on a PCL project.
I'm trying to build a multiplatform QR code generator/scanner. I have no problem using this library with both Android and iOS projects. however with UWP an exception is generated every time i try to generate the QR code ( see picture included). the same thing happens when i try to scan a QR code, either the app exits or it hangs at "Systems.Diagnostics.Debugger.Break();"
I've installed the Zxing library properly using Nuget, i dont understand what could cause this behavior?
has anyone ever encountered this kind of problem?
thank you for your help,

here's the code i'm using to scan a QR code :

public partial class QRCode : ContentPage

{
ZXingBarcodeImageView barcode;
public QRCode(string data)
{
InitializeComponent();
string _stringToEncode = data;
var layout = new StackLayout() { VerticalOptions = LayoutOptions.StartAndExpand, WidthRequest=600, HeightRequest=600, Padding=10 };
barcode = new ZXingBarcodeImageView
{
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand,
};

        barcode.BarcodeFormat = ZXing.BarcodeFormat.QR_CODE;
        barcode.BarcodeOptions.Width = 300; 
        barcode.BarcodeOptions.Height = 300;
        barcode.BarcodeOptions.Margin = 10;
        barcode.BarcodeValue = _stringToEncode;
        layout.Children.Add(barcode);
        layout.Children.Add(StackThree);
        Content = layout;
    }

}
}

Sign In or Register to comment.