-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Geolocation getCurrentLocation request times out when GPS is turned off then on again #16903
Comments
i have the same issue ... |
Same issue with the getCurrentPosition: |
me too! RN: 0.51.0 |
Happens always, at least in RN 0.49 and 0.53 |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
it's not solved please don't close it |
I solved the getCurrentPosition issue with the enableHighAccuracy, this is the workaround: const getCurrentPosition = (onSuccess, onError, error3) => {
navigator.geolocation.getCurrentPosition(
(position) => onSuccess(position),
(err) => {
if (err.code === 3 && !error3) {
getCurrentPosition(onSuccess, onError, true);
} else {
onError(err);
}
},
{ enableHighAccuracy: !error3, timeout: 5000 },
);
};
getCurrentPosition(
(position) => console.log('position', position),
(error) => console.log('position error', error),
) |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
The text was updated successfully, but these errors were encountered: