react-native-geolocation icon indicating copy to clipboard operation
react-native-geolocation copied to clipboard

Location fetching on wifi connected device and not working on Mobile data enable

Open SKHRAPP opened this issue 1 year ago • 5 comments

this is my code please help to work both mobile and wifi mode

import Geolocation from '@react-native-community/geolocation';

export const locationBackgroundCapture = () =>
  new Promise((resolve, reject) => {
    Geolocation.getCurrentPosition(
      position => {
        const currentLongitude = JSON.stringify(position.coords.longitude);
        const currentLatitude = JSON.stringify(position.coords.latitude);
        let data = {
          latitude: currentLatitude,
          longitude: currentLongitude,
        };
        resolve(data);
      },
      error => {
        reject(error);
      },
      {
        accuracy: {
          android: 'high',
          ios: 'best',
        },
        enableHighAccuracy: true,
        maximumAge: 10000,
        timeout: 50000,
      },
    );
  });

React Native Version - 0.72.4 plugin version - 3.2.1

SKHRAPP avatar Aug 06 '24 13:08 SKHRAPP

+1

justb avatar Aug 07 '24 03:08 justb

+1

rodrigocardoso-rc avatar Aug 27 '24 21:08 rodrigocardoso-rc

+1

ViniciusCanaan avatar Aug 27 '24 22:08 ViniciusCanaan

+1

sabash-dartexon avatar Oct 03 '24 07:10 sabash-dartexon

+1 any update from this issue

SKHRAPP avatar Oct 24 '24 09:10 SKHRAPP