Search code examples
facebookgeolocationreact-native

React-Native Geolocation doesn't work as expected on Android


When looking at the source of Geolocation library I cannot find what is the wrong. (also I don't know Java lang)

I've installed UIExplorer on a real Android device.

When I open UIExplorer Geolocation page initial and current position seems as unknown. Then it pops an alert as undefined.

Also I try Geolocation module on my own test app. It cannot determine my location.

However, when I walk, after 50 meters it determines my location.

What can I do to overcome this issue?

enter image description here


Solution

  • Actually I'd tried another Android phone before. I don't know why but after restart the phone it started to work!