Reputation: 6395
I'm using the zxing 2.1 version, I need to capture the qr code in portrait mode, I've set the displayOrientation to "90" in CameraConfigurationManager.
Modified Methods,
CameraConfigurationManager->initFromCameraParameters(Camera camera)
-> setDesiredCameraParameters(Camera camera, boolean safeMode)
But problem in setting the ViewFinder to match for portrait mode,can some one help me on how to do this..
Sam
Upvotes: 2
Views: 2710
Reputation: 6395
I found the following github project useful, https://github.com/pplante/zxing-android
It's using zxing 1.7 source as a base.
Have useful info in this link too http://code.google.com/p/zxing/issues/detail?id=178
Upvotes: 1
Reputation: 66886
It's not quite that simple, since the orientation has to be set correctly as well, the UI orientation has to be set, and the UI has to be rewritten to have a landscape version. You also have to detect the camera's orientation, and account for the fact that it may be on the front vs back. It's about 5 things to get right rather than a one line change. Have a go at it, and ask specific questions about what you have tried in another SO question then.
Upvotes: 2