Created
November 26, 2019 06:27
-
-
Save Lavanyagaur22/a11edb3c00f2436b66582e663f019957 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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