Customized camera view & rotation in Zxing for QR code?

后端 未结 3 914
迷失自我
迷失自我 2021-01-12 01:35

I am working with such a great library zxing to read QR code. I already got QR code successfully.

Now, My application runs in landscape mode and camera takes the who

3条回答
  •  礼貌的吻别
    2021-01-12 02:19

    I had really terrible experience from this library for the same reason. It seems that even if you succeed showing the camera in portrait mode, it will be stretched (or the output image would be stretched, or the barcode won't be sensed, or some devices had it working fine yet others didn't).

    I suspect that Android simply "likes" the camera preview to be in landscape mode, as this is its natural orientation when the user takes pictures.

    In the end, what I've done is using landscape mode and rotate everything else, so the user thinks it's portrait mode, but it's not. I think many apps use this technique.

    I suggest that if you somehow manage to handle this problem, test it on as many devices as you can.

提交回复
热议问题