-
Notifications
You must be signed in to change notification settings - Fork 257
[Help Wanted]: bg.BackgroundGeolocation.getCurrentPosition returns before timeout and desiredAccuracy reached #1506
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
Comments
Why do you not post the associated logs? |
Because there aren't any relevant logs. When I call Now it gives me Can I assume that If yes, the problem before could be sourced in the emulator again. |
Now it happened again. As you can see, the accuracy first is
|
How old is the first location? |
The log does say that, doesn't it? |
exactly.
The location with The location with
The plugin prefers to provide the more recent. A device can move many meters away in 27 seconds. |
But I am requesting an up-to-date location with an accuracy of 10 meters. Why does it return a location with 27m accuracy at all? No matter the age. |
Because the plug-in balances both age and accuracy. Where you were in the past is less relevant than where you were <1s ago. |
But I need a high accurate location at time of request. If I request an accuracy of 10m or better, it should return it, or return the best accurate location it could fetch after the timeout. Otherwise, how do these parameters make sense then? What would you suggest? |
Next example:
Age is 7ms, timeout was not reached, returned accuracy is 20m |
A default of only
|
So the solution would be to increase the number of samples? |
try it and see |
All right |
I set That's my call: here is a short log output:
The plugin is supposed to return the location when:
Is that correct? |
I'm not interested in Post the plugin's own native logs. |
At Sample 58 of 100 it returns the location. |
Have you had a chance to look at the logs yet? |
Uh oh!
There was an error while loading. Please reload this page.
Required Reading
Plugin Version
4.12.0
Mobile operating-system(s)
Device Manufacturer(s) and Model(s)
Pixel9 Pro Emulator
Device operating-systems(s)
Android 16
What do you require assistance about?
bg.BackgroundGeolocation.getCurrentPosition(desiredAccuracy: 10, timeout: 20)
returns with a lower accuracy e.g. 25 meters and does not wait for the timeout to elapse.What am I doing wrong? How can I wait for the desiredAccuracy or just return the fetched location when the timeout is reached?
[Optional] Plugin Code and/or Config
[Optional] Relevant log output
The text was updated successfully, but these errors were encountered: