Skip to content
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

🐞 MapboxFusedLocationEngineImpl may always report NETWORK_PROVIDER locations if the device clock is significantly faster than the satellite clock #560

Open
ystsoi opened this issue Jan 23, 2022 · 0 comments
Labels

Comments

@ystsoi
Copy link

ystsoi commented Jan 23, 2022

Utils.isBetterLocation uses Location.getTime to compare location time. If the device clock (used by the NETWORK_PROVIDER) is significantly faster than the satellite clock (used by the GPS_PROVIDER), MapboxFusedLocationEngineImpl may always take the NETWORK_PROVIDER locations.

It is better to use Location.getElapsedRealtimeNanos instead, at least in API level 17.

There is a FUSED_PROVIDER in Android 12, which alleviates this issue. So better to test using older devices with cellular data enabled.

@ystsoi ystsoi added the bug label Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant