Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SKHRAPP opened this issue Aug 6, 2024 · 5 comments
Labels
question Further information is requested

Comments

@SKHRAPP
Copy link

SKHRAPP commented Aug 6, 2024

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 SKHRAPP added the question Further information is requested label Aug 6, 2024
@justb
Copy link

justb commented Aug 7, 2024

+1

3 similar comments
@rodrigocardoso-rc
Copy link

+1

@ViniciusCanaan
Copy link

+1

@sabash-dartexon
Copy link

+1

@SKHRAPP
Copy link
Author

SKHRAPP commented Oct 24, 2024

+1 any update from this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants