             break;
         }
         
-        setupCaptureSession(preview)
+        setupCaptureSession(preview, complete: complete)
+    }
+    
+    internal func turnOn(complete:CameraSetupComplete) {
+        dispatch_async(self.sessionQueue) {
+            if (self.setupResult == .Success) {
+                // Only setup observers and start the session running if setup succeeded.
+                self.addObservers()
+                self.session.startRunning()
+                self.sessionRunning = self.session.running
+            }
+            dispatch_async(dispatch_get_main_queue()) {
+                complete(self.setupResult)
+            };
+        }
+    }
+    
+    internal func turnOff(complete: (Void) -> (Void)) {
+        dispatch_async(self.sessionQueue) { 
+            if (self.setupResult == CameraManualSetupResult.Success) {
+                self.session.stopRunning()
+                self.removeObservers();
+            }
+            dispatch_async(dispatch_get_main_queue()) {
+                complete()
+            };
+        }
+    }
+    
+    private func addObservers() {
+    }
+    
+    private func removeObservers() {
     }
     
     // Setup the capture session.

    // Why not do all of this on the main queue?
    // Because -[AVCaptureSession startRunning] is a blocking call which can take a long time. We dispatch session setup to the sessionQueue
    // so that the main queue isn't blocked, which keeps the UI responsive.
    private func setupCaptureSession(preview:CameraPreview) {
        
        dispatch_async(self.sessionQueue) {
            if ( self.setupResult != CameraManualSetupResult.Success ) {
                return;

    }
}

typealias CameraSetupComplete = ((CameraManualSetupResult) -> (Void))

class Camera: NSObject {
    // MARK: properties
    internal var session: AVCaptureSession = AVCaptureSession.init()
    private var sessionQueue: dispatch_queue_t = dispatch_queue_create("com.campmobile.band.Camera", DISPATCH_QUEUE_SERIAL)
    private var videoDevice:AVCaptureDevice?
    private var videoDeviceInput: AVCaptureDeviceInput?
    private var stillImageOutput:AVCaptureStillImageOutput?
    
    // MARK: Utilities
    internal var setupResult:CameraManualSetupResult = CameraManualSetupResult.CameraNotAuthorized
    internal private(set) var sessionRunning:Bool = false
    private var backgroundRecordingID:UIBackgroundTaskIdentifier = UIBackgroundTaskInvalid
    
    // MARK: handler
    var onStartCamera: ((CameraManualSetupResult) -> (Void))? = nil
    
    internal func setupWithPreview(preview:CameraPreview, complete:CameraSetupComplete) {
        let authorizationStatus = AVCaptureDevice.authorizationStatusForMediaType(AVMediaTypeVideo)
        
        switch (authorizationStatus) {
