Re: JellyBean tablet unable to finish scan

54 views
Skip to first unread message

Sean Owen

unread,
Nov 14, 2012, 12:52:32 PM11/14/12
to zx...@googlegroups.com
As you said there's not really any info to go on here. It works fine on JB and on tablets.

Usually when it looks like it really wants to scan a QR code but doesn't, it's because the image is incorrectly flipped over when presented to the app.
And this usually happens on front cameras, on devices with buggy implementations that don't realize you only flip the image over when flinging onto a SurfaceView.

You can try tweaking the code to flip over the image in all cases and see if that does it. that would prove it, but would just mean it's a device bug.

Liam Jackson

unread,
Nov 15, 2012, 4:27:59 AM11/15/12
to zx...@googlegroups.com
Thanks Sean,
I changed the last line in CameraManager.java to:
    // Go ahead and assume it's YUV rather than die.
    return new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top,
                                        rect.width(), rect.height(), true);

And now barcodes seem to scan from this tablet - Thanks very much for your quick reply and help!

Liam.

Sean Owen

unread,
Nov 15, 2012, 6:33:26 AM11/15/12
to zx...@googlegroups.com
Yeah that's it. This means the image data is flipped over when presented to the app, when it is not supposed to be. If possible, report it to whoever manufactures the tablet.

Sean Owen

unread,
Jun 6, 2013, 7:45:06 AM6/6/13
to zx...@googlegroups.com
There's not much info here. If it doesn't work on one device, then generally that means a problem with the device. Usually it is because the device fails to configure the camera. You would have to provide logs or more detail.
Reply all
Reply to author
Forward
0 new messages