I am making a barcode scanner app using the vision.barcodereader API. I was wondering how to set my cameraSource's zoom programattically, so that the zoom camera zoom starts at a specific zoom i.e. 25%. Also, the zoom does not have to be adjustable, so I am only asking how to fix it on a specific zoom. My target API is 24, with the min API at 21, and the following code has not worked so far. If you could possibly answer with a code snippet for zooming the camera as described that would be fantastic. Thanks!
@Override
public void onStart(){
int maxZoom= parameters.getMaxZoom();
parameters.setZoom(maxZoom);
camera.setParameters(parameters);
}