Code example for Camera

Methods: reconnectrelease

0
    private void startCamera() { 
        if (mCamera == null) {
            mCamera = Camera.open();
        } else { 
            try { 
                mCamera.reconnect();
            } catch (IOException e) {
                mCamera.release();
                mCamera = null;
 
                Log.e(LOG_TAG, "Error opening the camera", e);
            } 
        } 
    } 
     
    private void stopCamera() { 
        if (mCamera != null) {
            try { 
                mCamera.stopPreview();
            } catch (Exception e) {
                // Ignore