We are creating an application that reads bar codes using zxing.
I have a question, but when the camera is started, the screen is horizontal from the vertical.
Is there a way to start on a vertical screen?
Development Environment
Android Studio 1.3.1
zxing-android-embedded: 3.0.3
zxing:core:3.2.0
Thank you for your cooperation.
java android android-layout
If you are using the Camera class, you can do it with setDisplayOrientation.
http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)
It's too late, but here's the answer.
For zxing-android-embedded, the only way to make it vertical was to create an empty activity that inherited CaptureActivity and specify orientation in manifest.
https://github.com/journeyapps/zxing-android-embedded#changing-the-orientation
I wanted to do a little more for my use, so I stopped using it and used another library that implements my own View.It was quite easy to use, so please consider it.
https://github.com/dm77/barcodescanner
© 2024 OneMinuteCode. All rights reserved.