release Camera - Android Camera

Android examples for Camera:Camera Close

Description

release Camera

Demo Code


//package com.java2s;
import android.hardware.Camera;

public class Main {
    private static Camera camera = null;

    public static void releaseCamera() {
        if (camera != null) {
            camera.stopPreview();/* w  w  w .j a va  2  s. co m*/
            camera.release();
            camera = null;
        }
    }
}

Related Tutorials