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

Explore defaults to worldwide #2032

Closed
kueda opened this issue Sep 3, 2024 · 5 comments · Fixed by #2045
Closed

Explore defaults to worldwide #2032

kueda opened this issue Sep 3, 2024 · 5 comments · Fixed by #2045
Assignees
Labels
Android Issues that are unique to Android bug Something isn't working

Comments

@kueda
Copy link
Member

kueda commented Sep 3, 2024

Describe the bug
On Android, going to Explore defaults to worldwide, even when you have already granted location permissions.

To Reproduce
Steps to reproduce the behavior:

  1. Make sure you have granted location permissions
  2. Go to Explore
  3. Note that the header says "Nearby" briefly then switch to "Worldwide"
  4. Woldwide results load

Expected behavior
Nearby results should load be default.

Context (please complete the following information):

  • Device: Pixel 8
  • OS: Android 14
  • App version: 0.44.0
@kueda kueda added bug Something isn't working Android Issues that are unique to Android labels Sep 3, 2024
@kueda kueda added this to iNat Mobile Sep 3, 2024
@kueda kueda moved this to Todo in iNat Mobile Sep 3, 2024
@israr002
Copy link
Contributor

israr002 commented Sep 4, 2024

@kueda this issue is in getCurrentPosition in src/sharedHelpers/fetchUserLocation.ts as it is using geolocation and giving error {"ACTIVITY_NULL": 4, "PERMISSION_DENIED": 1, "POSITION_UNAVAILABLE": 2, "TIMEOUT": 3, "code": 3, "message": "Location request timed out"}
this issue also raised by other users michalchudziak/react-native-geolocation#272
we need to set enableHighAccuracy : false to make it work
i have tested it and gives accurate result also i installed latest library version to test but still this change is needed.
let me know if i can proceed to raise a pr

@mtebele
Copy link

mtebele commented Sep 4, 2024

Same issue here

@kueda
Copy link
Member Author

kueda commented Sep 4, 2024

Looks like michalchudziak/react-native-geolocation#317 supposedly fixed it so maybe this is just a matter of updating a dependency. @israr002, sure, go ahead and work on this if you like, I'll assign you. Please try to update the library first and if that doesn't work, go ahead and try that workaround with enableHighAccuracy (high accuracy isn't really required on Explore anyway).

@israr002
Copy link
Contributor

israr002 commented Sep 5, 2024

@keuda i checked in the new version the issue is same.
Also with enableHighAccuracy: false i tested by toggling simultaneously between worldwide and nearby it was failing sometimes so i have to remove the maximumAge: 0 after that it was working fine and giving accurate result

@mtebele
Copy link

mtebele commented Sep 5, 2024

Looks like michalchudziak/react-native-geolocation#317 supposedly fixed it so maybe this is just a matter of updating a dependency. @israr002, sure, go ahead and work on this if you like, I'll assign you. Please try to update the library first and if that doesn't work, go ahead and try that workaround with enableHighAccuracy (high accuracy isn't really required on Explore anyway).

Same issue with the latest version. With enableHighAccuracy:true it gives always timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues that are unique to Android bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants