Describe the bug
9/12/19 Update:
I was totally incorrect about what was going on. The ZTE Cymbal T runs android 5 but when it tries to use Camera2 it is falling back to Camera1. This issue here is with Camera1 and not Camera2. I have also validated that the Camera2 functionality works perfectly on a Nexus 6, only when using Camera1 is it upside down. Because of this I consider it a much lower of a priority.
Some devices have cameras installed in the device in non-standard orientations, usually with the front camera (selfie). Examples are some of the Nexus 5/6 devices and a test device I have, ZTE Cymbal T. The issue here is only with Camera1 and only with the preview. The recorded video is in the correct orientation.
I did some tests forcing the camera into Camera1 and then tested the fix on the broken device and on a device that did not have the problem.
Steps performed:
Holding phone portrait, back camera:
Holding phone portrait, switch to selfie camera:
Rotate phone to landscape, switch to back camera
Holding phone in landscape: switch to selfie camera:
Describe the bug 9/12/19 Update: I was totally incorrect about what was going on. The ZTE Cymbal T runs android 5 but when it tries to use Camera2 it is falling back to Camera1. This issue here is with Camera1 and not Camera2. I have also validated that the Camera2 functionality works perfectly on a Nexus 6, only when using Camera1 is it upside down. Because of this I consider it a much lower of a priority.
Some devices have cameras installed in the device in non-standard orientations, usually with the front camera (selfie). Examples are some of the Nexus 5/6 devices and a test device I have, ZTE Cymbal T. The issue here is only with Camera1 and only with the preview. The recorded video is in the correct orientation.
I did some tests forcing the camera into Camera1 and then tested the fix on the broken device and on a device that did not have the problem.
Steps performed:
With my changes in place : https://github.com/pvasa/cameraview-ex/pull/209
ZTE Cymbal T: Camera locked in portrait
Xaiomi: Camera locked in portrait
Try it out on a few devices forcing the camera to use Camera1 and see if it also works correctly for you.
Device (please complete the following information):