We have an app written in c# with xamarin and all activities are forced in portrait mode. However this gives some orientation issues when recording an video. The meta data is wrong when the video is recorded in landscape mode. I tried using these methods.
Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
Camera.GetCameraInfo(_currentCamera, cameraInfo);
var surfaceOrientation = WindowManager.DefaultDisplay.Rotation;
However they provide a fixed angle no matter how the device is turned. How can I get the actual device orientation even though the activity is fixed in portrait mode?