Search code examples
androidgoogle-mapsgoogle-geocodergeocode

Geocoder in android gives "Service not available error" sometimes on some device. How to deal with this?


Geocoder in android gives "Service not available error" sometimes on some device. How to deal with this? This error occurs in pre M devices only. P.S I know this question has been asked many times but i didnot got the ultimate solution for same.


Solution

  • The actual reason why Geocoder was not working is because the NetworkLocator was killed in action. Probably due to less memory or maybe you used the Task Manager to kill all services.

    This error occurs occasionally if the GeoCoding provider fails and is unable to geocode your location.

    So to solve this you have to restart the device.