Skip to content

Instantly share code, notes, and snippets.

@Lavanyagaur22
Created November 24, 2019 04:50
Show Gist options
  • Save Lavanyagaur22/717491cfabbb3f6c0da0af94cb0a50b2 to your computer and use it in GitHub Desktop.
Save Lavanyagaur22/717491cfabbb3f6c0da0af94cb0a50b2 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