Skip to content

Geolocation timed out, code 3 #12996

Description

@avdept

Description

I have geolocation running in my app, followed examples described in docs. IOS version works fine, android however works only on non xiaomi devices. I tried on 2 xiamomi devices, and got Location request timed out error. While on samsung devices it works fine.

Reproduction

navigator.geolocation.getCurrentPosition(
            (position) => {
                let initialPosition = JSON.stringify(position);
                console.log(initialPosition);
            },
            (error) => console.log(JSON.stringify(error)),
            {enableHighAccuracy: Platform.OS != 'android', timeout: 2000, maximumAge: 2000 }
        );

Solution

Need to find a way either provide reason why timed out, or just fix it.

Additional Information

  • React Native version: 0.42
  • Platform: Android
  • Operating System: Mac OS
  • Dev tools: Android SDK v23

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