Welcome
I have this code
imageCapture = ImageCapture.Builder()
.apply {
this.setTargetRotation(orientation)
if ( actualCameraIsFormat16_9 ) {
this.setTargetAspectRatio(AspectRatio.RATIO_16_9)
///AspectRatio.RATIO_4_3
} else {
this.setTargetResolution(Size(width, height))
}
if ( actualCameraIsMaxQuality ) {
this.setCaptureMode(ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY)
}
this.setFlashMode(flashLamp)
}
.build()
it show setTargetAspectRatio and setTargetResolution are Deprecated
How to use ResolutionSelector with AspectRatioStrategy to specify the preferred aspect ratio?