Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

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

Description

@ystsoi

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions