public boolean isCameraClosed() {
        return cameraInstance == null || cameraInstance.isCameraClosed();
    }
@return true if the camera has been closed in a background thread.
zxing-android-embedded/src/com/journeyapps/barcodescanner/CameraPreview.java