How could I make my image orientation same as preview image in camera api2 and set android:screenOrientation="portrait"
, which will force the window rotation to a fixed value?
Generally, I try to get the mobile orientation when using capture action, but with the portrait setting, it doesn't work.
getWindowManager().getDefaultDisplay().getRotation()
cameraCharacteristics.get(CameraCharacteristics.SENSOR_ORIENTATION)
I know how to set a right orientaion, the problem is how to know the orientation used during the capture action?