Java tutorial
//package com.java2s; import android.hardware.Camera; public class Main { /** */ public static void autoFocus(Camera camera, Camera.AutoFocusCallback autoFocusCallback) throws RuntimeException { if (camera == null) return; camera.cancelAutoFocus(); camera.autoFocus(autoFocusCallback); } }