Open ghost opened 3 years ago
Not related to xiaomi/huawei, my redmi note 3 works fine. It's most probably a device specific issue, or might be an area with low gps signal. You can remove timeout option and see how long it takes to get a location fix.
I have the same issue. 😢
Had the same issue. I fixed it by setting android accuracy to "balanced". But I don't know if this is the right solution.
accuracy: { android: "balanced", ... },
But to be able to test it on the simulator I had to change it to "high" again. I got this workaround from GH-296
the default getCurrentPosition method is andorid native method if ur phone does not have gms.
u need to implement LocationProvider for hms like this:
Did you fix it finally?I have the same issue.
cross posting this here just in case someone wants to test this possible fix: https://github.com/Agontuk/react-native-geolocation-service/issues/174#issuecomment-1343015525
It always returns error_code=3, error_message="Location request timed out". It works in simulator, but not in real phone (Xiaomi and Huawei).
code:
My intuition is that google play service is not supported in China. So, I changed locationProvider to non-google provider manually (as shown below). However, still timeout error.