Skip to content

Didn't work current position on Android #352

Open
@Slm-developer

Description

@Slm-developer

Platforms

Android bug, but didnt check on IOS.

Versions

  • Android: 10
  • iOS: -
  • react-native-geolocation: ^3.4.0
  • react-native: 0.77.0
  • react: 18.3.1
  • newArch - enabled

Description

Can't get the current position,

useEffect(() => {
    const getPosition = async () => {
      const granted = await getPermissions();
      if (granted) {
        Geolocation.getCurrentPosition(
          position => {
            console.log(position);
          },
          error => {
            console.log('error', error);
          },
          {
            enableHighAccuracy: false,
            timeout: 3000,
            maximumAge: 3000,
          },
        );
      }
    };
    getPosition();
  });

All the time have error, with newArch enabled.

https://imgur.com/uBKv3Om

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions