Open stathis-kontogiannis opened 8 years ago
I am with the same issue. I have many barcodes in a paper and some times the code had read is one above or one below, not the barcode at center of screen. I tried to read the sources and I found nothing like to limit the area of scanner.
I have the exact same problem. I tries to play and tweak the returned CameraResolution at the CameraResolutionSelector, but in same devices (like Samsung Galaxy S7 edge) this tweak generates a "SetupCamera failed" error that comes with a black screen. I think that if this is a bug it should be fixed with high priority because we can't publish any app with stretched QR code scanner. If all the above are not bugs please provide us a working solution
I have the same issue. Its strange that only few people notice that, I installed in new empty project that lib and camera image stretched anyway. Can someone help me?
10/10 can confirm ugly stretched hands..
Image with camera app (OP 3T) screenshot using my own app. Code below
using Android.App;
using Android.Widget;
using Android.OS;
using ZXing.Mobile;
using System;
using Android.Views;
namespace App1
{
[Activity(Label = "App1", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
MobileBarcodeScanner.Initialize(Application);
var btn = FindViewById<Button>(Resource.Id.button1);
btn.Click += async (sender, e) => {
var scanner = new ZXing.Mobile.MobileBarcodeScanner();
scanner.UseCustomOverlay = true;
scanner.CustomOverlay = LayoutInflater.FromContext(this).Inflate(Resource.Layout.Test, null);;
var result = await scanner.Scan();
if (result != null)
Console.WriteLine("Scanned Barcode: " + result.Text);
};
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:p1="http://schemas.android.com/apk/res/android"
p1:orientation="vertical"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="100dp"
p1:id="@+id/linearLayout1" />
I'm also experiencing this with the Xamarin Forms version on my Samsung Galaxy S4 (Android 6) and S8 (Android 7). It's notably worse in landscape mode.
In Xamarin.Forms project I've faced with the same problem (tried versions 2.3.2 and 2.1.47).
I've tested it on Samsung S8 (Android 7), OnePlus 3T (Android 8), Asus Zenfone 5 (Android 5). The problem isn't related with custom or default overlays. I've tried other resolutions, other settings, but problem anyway exists.
Maybe someone found a solution?
UPDATED. I've found that the same project built on different machines works different. At one machine I got app with distorted camera, but on other - scanner in app works without distortion. Still trying to resolve it
Portrait mode
Any progress on this? I'm experiencing the same issue
Same here :(. Any ideas to solve this problem ?
Is this still not solved?!
Any solution to this problem?
My screen consists of 1/3 scan area and the rest is other layouts (buttons, images etc) i use the customOverlay property.Then, I start scanning but the scanning area seems to be stretched (in portait view) and a little bit "laggy". How i can fix this?