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

    var flashState = 2; //0 = off, 1 = On, 2 = Auto
    var quadState = 0; //0 = UL , 1 = UR, 2 = LL, 3 = LR
    var badgeCounter = 0;

     //send data back to the plugin class
    var jsonGen = HappieCameraJSON();
    var thumbGen = HappieCameraThumb();

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

