         self.updateLocationAccuracyIfNecessary()
     }
 
-    func batteryStateChanged(_ notification: Notification) {
+    internal func batteryStateChanged(_ notification: Notification) {
         self.updateLocationAccuracyIfNecessary()
     }
     

        }        
    }

    func applicationWillResignActive(_ notification: Notification) {
        if self.updatingPosition == true {
            return
        }

        
        self.updateLocationAccuracyIfNecessary()
    }
    
    // battery
    
    internal func addBatteryObservers() {
        NotificationCenter.default.addObserver(self, selector: #selector(Position.batteryLevelChanged(_:)), name:NSNotification.Name.UIDeviceBatteryLevelDidChange, object: UIApplication.shared)
        NotificationCenter.default.addObserver(self, selector: #selector(Position.batteryStateChanged(_:)), name:NSNotification.Name.UIDeviceBatteryStateDidChange, object: UIApplication.shared)
    }

    internal func batteryLevelChanged(_ notification: Notification) {
        let batteryLevel: Float = UIDevice.current.batteryLevel
        if batteryLevel < 0 {
            return
