Android examples for android.hardware:Close Camera
release Camera
import android.hardware.Camera; public class Main{ private static Camera sOpenedCamera = null; private static Object sAccesLock = new Object(); public static void releaseCamera() { synchronized (sAccesLock) { if (sOpenedCamera != null) { sOpenedCamera.release(); sOpenedCamera = null;//from ww w .j a v a2 s . com } } } }