0

Edited:

I've been trying to use React-Native Geolocation API in my app. The apı the same with https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation

However, the API is not as good as Android native geolocation services. When I run the app, my location cannot be found unless I move 40 meters.

I guess also Android applies some strategies to find the user location.

How to use Geolocation API like iOS and Android native services?

efkan
  • 12,991
  • 6
  • 73
  • 106

1 Answers1

0

Not sure if you have tried it already but ,try adding cell tower and or wifi information in the request.

Why am I getting a very large accuracy radius in my Geolocation response?

If your Geolocation response shows a very high value in the accuracy field, the service may be geolocating based on the request IP, instead of WiFi points or cell towers. This can happen if no cell towers or access points are valid or recognized.

To confirm that this is the issue, set considerIp to false in your request. If the response is a 404, you've confirmed that your wifiAccessPoints and cellTowers objects could not be geolocated.

Check the FAQ section here .

DntFrgtDSemiCln
  • 1,259
  • 2
  • 16
  • 35
  • Thanks. I guess it's my fault. The lack of information. Actually I've been developing a cross-platform React-Native app. If I success in using Geolocation -that is the same with navgator.geolocation API in HTML- then I can use the apı both of OS and Android. – efkan Mar 22 '16 at 21:26
  • This link should be a good start : http://www.andygup.net/how-accurate-is-html5-geolocation-really-part-2-mobile-web/ – DntFrgtDSemiCln Mar 22 '16 at 21:36