Skip to content

Geolocation timed out, code 3 #12996

Closed
Closed
@avdept

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

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