             log("Activity Manager is not Available");
         }
     }
-    
-//    func activityTypeToString(activityType:NSString) -> NSString {
-//        var type = "UNKNOWN";
-//        
-//        switch(activityType) {
-//            case data.stationary
-//        }
-//    }
-    
-    
-//    
-//    func sendActivityCallback(activityData : NSObject) {
-//        var activityArray : NSArray;
-//        
-//        if(activityCommandDelegate != nil) {
-//            let activityObj:Dictionary = [
-//                "activityType" : activityData.
-//            ]
-//        } else {
-//            log("Got activity update but do not have a command delegate to send it to")
-//        }
-//    }
-//    
     
     func confidenceToInt(confidence : CMMotionActivityConfidence) -> Int {
         var confidenceMult = 0;


        taskManager.beginNewBackgroundTask();

        locationTimer = NSTimer.scheduledTimerWithTimeInterval(interval, target: self, selector: #selector(LocationManager.restartUpdates), userInfo: nil, repeats: false);

        if(stopUpdateTimer != nil) {
            stopUpdateTimer.invalidate();

            self.updating = true;

            self.manager.delegate = self;
            self.manager.desiredAccuracy = self.lowPowerMode ? kCLLocationAccuracyThreeKilometers : desiredAccuracy;
            self.manager.distanceFilter = self.lowPowerMode ? 10.0 : distanceFilter;

            self.manager.startUpdatingLocation();
            self.manager.startMonitoringSignificantLocationChanges();
