My group is doing a camera app. We just do not know what code to use to zoom in on the camera. Does anyone know how to do it?
My group is doing a camera app. We just do not know what code to use to zoom in on the camera. Does anyone know how to do it?
This below will work if the user's Android is:
Camera.Parameters parameters = camera.getParameters();
int maxZoom = parameters.getMaxZoom();
if (parameters.isZoomSupported()) {
if (zoom >=0 && zoom < maxZoom) {
parameters.setZoom(zoom);
} else {
// zoom parameter incorreto
}
}