Code example for Camera

Methods: cancelAutoFocusreleasesetPreviewCallbackstopPreview

0
    } 
 
    public void release() { 
        if (camera != null) {
            autoFocus.cancel();
            camera.stopPreview();
            camera.setPreviewCallback(null);
            camera.cancelAutoFocus();
            camera.release();
            camera = null;
        } 
    } 
 
    public View getView() {
        return preview;
    } 
 
    private static Camera getCameraInstance(){
        Camera c = null;
        try { 
            c = Camera.open();