captureRequestBuilder settings can be changed like this
captureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW)
captureRequestBuilder.set(CaptureRequest.SHADING_MODE, CaptureRequest.SHADING_MODE_FAST)
captureRequestBuilder.set(CaptureRequest.JPEG_QUALITY, 95)
to preserve these setting after closing the app i could use SharedPreferences
val sharedPref = getPreferences(Context.MODE_PRIVATE)
(sharedPref.edit()) {
val qlt = captureRequestBuilder.get(CaptureRequest.JPEG_QUALITY)
putInt(CaptureRequest.JPEG_QUALITY.name, qlt ?: 100)
apply()
}
but captureRequestBuilder
has a lot of settings so thats a lot of code to write for each setting
is there a faster simpler way to save-load it?