     var isStationary = false;
     
     override init() {
+        super.init();
+        
         if(CMMotionActivityManager.isActivityAvailable()) {
+            log("Activity Manager is Available");
+            
             self.manager = CMMotionActivityManager();
             self.available = true;
+        } else {
+            log("Activity Manager is not Available");
         }
     }
     

        enabled = false;

        locationManager.stopBackgroundTracking();
//        activityManager.stopDetection();

        let pluginResult = CDVPluginResult(status: CDVCommandStatus_OK)
        commandDelegate!.sendPluginResult(pluginResult, callbackId:command.callbackId)


        taskManager.endAllBackgroundTasks();
        locationManager.stopUpdating();
        activityManager.stopDetection();
    }

    func onSuspend() {
