Leonard Piltz
unread,Nov 27, 2014, 2:56:31 AM11/27/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to zx...@googlegroups.com
Hello,
we got a problem with our app and the barcode scanner in Xamarin.
If we use the barcode scanner, the screen will be black and we got this console output:
[Mono] Assembly Ref addref labGate_mobile.Android[0x63735948] -> ZXing.Net.Mobile[0x63a28950]: 2
[Mono] Assembly Ref addref labGate_mobile.Android[0x63735948] -> zxing.monoandroid[0x63a46820]: 2
[Mono] Assembly Ref addref ZXing.Net.Mobile[0x63a28950] -> zxing.monoandroid[0x63a46820]: 3
[Mono] Assembly Ref addref ZXing.Net.Mobile[0x63a28950] -> Xamarin.Android.Support.v4[0x63ab76e0]: 2
[Mono] Assembly Ref addref Xamarin.Android.Support.v4[0x63ab76e0] -> Xamarin.Android.Support.v13[0x63ac2590]: 2
[ResourceType] Bad XML block: header size 18254 or total size 169478669 is larger than data size 882
The App got permissions to use the camera with:
<uses-permission android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.CAMERA" />
And our code snippet:
bu_barcode.Click += scanBarcode;
bu_search_cancel.Click += delegate {
if(bu_search_cancel.Text == Resources.GetString(Resource.String.cancel)){
refreshData("", Filter.All);
et_search.Text = "";
input_manager.HideSoftInputFromWindow(et_search.WindowToken, 0);
bu_search_cancel.Text = Resources.GetString(Resource.String.search);
} else {
et_search.RequestFocus();
input_manager.ShowSoftInput(et_search, ShowFlags.Implicit);
bu_search_cancel.Text = Resources.GetString(Resource.String.cancel);
}
bu_search_cancel.Visibility = ViewStates.Gone;
};
public async void scanBarcode (Object sender, EventArgs e){
var scanner = new ZXing.Mobile.MobileBarcodeScanner (this);
var result = await scanner.Scan ();
Console.WriteLine ("RESULT: " + result.Text);
}
Hope here can somebody help me
Freundliche Grüße / best regards