-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relaxing the accuracy level (both for horizontal accuracy and received interval) for room and house #265
Comments
Same issue if start continous request and ask for oneShot - OneShot will be waiting for location update based on continous request options |
@abakhtin did you resolve this issue? |
I'm seeing the same. Any luck? |
Getting the same problem |
Also, |
I tried to reproduce the issue but it seems to works fine: r1 = LocationManager.shared.locateFromGPS(.continous, accuracy: .block, activity: .otherNavigation) { result in
print("#1 -> \(result)")
}
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
self.r2 = LocationManager.shared.locateFromGPS(.continous, accuracy: .city, activity: .otherNavigation) { result in
print("#2 -> \(result)")
}
}
DispatchQueue.main.asyncAfter(deadline: .now() + 60) {
self.r1?.stop()
debugPrint("-----------------------------------> STOP FIRST")
} I can receive both I've relaxed these parameters to the following levels: for meters public var value: CLLocationAccuracy {
switch self {
case .any:
return CLLocationAccuracyAccuracyAny
case .city:
return 5000
case .neighborhood:
return 1000
case .block:
return 100
case .house:
return 60 // from 15 mt
case .room:
return 25 // from 5 mt
case .custom(let value):
return value
}
} and interval: public var interval: TimeInterval {
switch self {
case .city:
return 600.0
case .neighborhood:
return 300.0
case .block:
return 60.0
case .house:
return 40.0 // from 15secs
case .room:
return 20.0 // from 5secs
default:
return TimeInterval.greatestFiniteMagnitude
}
} Since the next update. |
locateFromGPS
in continous
mode
Let me know if it works for you |
If I call
multiple times at different times, and I start location tracking on each handler, only the first receives updates. The 2nd start receiving updates only if the first one is stopped.
For this to happen, I delayed the 2nd call to
locateFromGPS
by 10 seconds (usingDispatchQueue.main.asyncAfter()
)If I replace
.continous
with.oneShot
it works fine instead.Is it supposed to work this way, or is it a bug?
The text was updated successfully, but these errors were encountered: