-
Notifications
You must be signed in to change notification settings - Fork 296
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I have only tested this in android physical device till yet. so I am getting the lat,long. but if i turn off the gps then error() is not triggering.
Again if I turn on the gps then again I am getting lat,long
Versions
Please add the used versions/branches
- react-native-geolocation-service: "^5.3.1"
- react-native: "0.76.2",
- react: "18.3.1"
const fetchCurrentLocation = async () => {
Geolocation.watchPosition(
(position) => {
console.log('Position:', position);
},
(error) => {
console.warn('Location error:', error);
},
{
enableHighAccuracy: true,
interval:5000,
timeout: 5000,
maximumAge: 5000,
distanceFilter: 0,
fastestInterval: 2000,
}
);
};
useEffect(() => {
fetchCurrentLocation();
}, [])
Sometimes I am getting the error, Most of the times I am not getting the error.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working