Skip to content

Instantly share code, notes, and snippets.

@Lavanyagaur22
Created November 26, 2019 06:27
Show Gist options
  • Save Lavanyagaur22/a11edb3c00f2436b66582e663f019957 to your computer and use it in GitHub Desktop.
Save Lavanyagaur22/a11edb3c00f2436b66582e663f019957 to your computer and use it in GitHub Desktop.
// Get the system service for the camera manager
val manager = getSystemService(Context.CAMERA_SERVICE) as CameraManager
// Gets the first camera id
var cameraId = manager.getCameraIdList().get(0)
// Determine the rotation on the FritzVisionImage from the camera orientaion and the device rotation.
// "this" refers to the calling Context (Application, Activity, etc)
var imageRotationFromCamera = FritzVisionOrientation.getImageRotationFromCamera(this, cameraId)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment