     var flashState = 2; //0 = off, 1 = On, 2 = Auto
     var quadState = 0; //0 = UL , 1 = UR, 2 = LL, 3 = LR
     var badgeCounter = 0;
-
+    var oldOrientationValue: UIDeviceOrientation = UIDeviceOrientation.Portrait;
+    
      //send data back to the plugin class
     var jsonGen = HappieCameraJSON();
     var thumbGen = HappieCameraThumb();

//        if(backCameraDevice?.flashAvailable){
//            setFlashModeToAuto(backCameraDevice!)
//        }

        delegate!.cameraFinished(self, JSON: pathJSON)
    }


//        if(backCameraDevice?.flashAvailable){
//            setFlashModeToAuto(backCameraDevice!)
//        }
        UIDevice.currentDevice().setValue(oldOrientationValue.rawValue, forKey: "orientation")
        delegate!.cameraFinished(self, JSON: pathJSON)
    }

