Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android - Geocoder.getFromLocationName() is not working in ICS device

I have two devices. One is HTC WildFire S and other one is HTC 1V. I used the Geocoder.getFromLocationName() in my application. It is running successfully in the HTC wildfire S. But in the HTC 1V i got the following error. why it's came? How can i solve this? please can anybody help me.

Code

Geocoder geoCoder = new Geocoder(getBaseContext(), Locale.getDefault()); 
//s is the address
List<Address> addresses = geoCoder.getFromLocationName(s, 5); //Here i got the following Exception.

Error

06-18 16:28:17.933: W/System.err(4960): java.io.IOException: Service not Available
06-18 16:28:17.953: W/System.err(4960):at android.location.Geocoder.getFromLocationName(Geocoder.java:178)

Location Tab

enter image description here

like image 966
naresh Avatar asked Jun 19 '12 10:06

naresh


1 Answers

Finally i found the answer :https://code.google.com/p/android/issues/detail?id=38009

Reboot your device for Geocoder to work. Hope it helps someone

Note: some say it will work if you use Google API 16

like image 175
Araib karim Avatar answered Oct 20 '22 07:10

Araib karim