Java tutorial
//package com.java2s; import android.hardware.Camera; import java.util.List; public class Main { public static void setCameraFocusMode(String focusMode, Camera camera) { Camera.Parameters parameters = camera.getParameters(); List<String> sfm = parameters.getSupportedFocusModes(); if (sfm.contains(focusMode)) { parameters.setFocusMode(focusMode); } camera.setParameters(parameters); } }