Skip to content

Geolocation 'enableHighAccuracy' on Android always times out #7495

Closed

Description

Image for: Description

Developing an Android app, whilst debugging on my Android Device running on 6.1, the geolocation api always returns an error callback with the message Location request timed out.

navigator.geolocation.getCurrentPosition(
      (position) => {
        console.log(position);
       },
       (error) => {
        console.log(error)
      },
      {enableHighAccuracy: true, timeout: 20000, maximumAge: 10000}
);

If I toggle enableHighAccuracy option to false, the api works fine. In high accuracy mode, the timeout always takes as long as I specify in the timeout option i.e. 20 seconds.

I've tried running with dev mode turned off.

Should high accuracy mode work in Android?

Metadata

Image for: Metadata

Metadata

Image for: 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

    Image for: Issue actions