     @objc private override init(){
         super.init()
         locationManager.delegate = self
-        locationManager.desiredAccuracy = kCLLocationAccuracyBest
-        locationManager.distanceFilter = 15
+        // Set an accuracy level. The higher, the better for energy.
+        locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers
+        // Enable automatic pausing
+        locationManager.pausesLocationUpdatesAutomatically = true
+        // Specify the type of activity your app is currently performing
+        locationManager.activityType = CLActivityType.OtherNavigation
+        // Enable background location updates
+        locationManager.allowsBackgroundLocationUpdates = true
+        // Start location updates
+        locationManager.startUpdatingLocation()
     }
     
 }

//MARK: - CLLocationManagerDelegate
extension CQZLocationManager:CLLocationManagerDelegate {
    public func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
        if let location = locations.last {
            currentLocation = location
            delegate?.didUpdateLocation?(location)
        }
    }
    
    public func locationManager(manager: CLLocationManager,

        locationManager.stopUpdatingLocation()
    }
    
    public func allowsBackground(allow:Bool) {
        locationManager.allowsBackgroundLocationUpdates = allow
    }
    
    //MARK: - private properties
    private let locationManager = CLLocationManager()
    
