same thing happens for me, only it never works so far...has anyone found out why this happens?
On Jan 22, 6:01 pm, Stefan Klumpp <[email protected]> wrote: > Okay. The weird thing is now: sometimes it works. Sometimes it > doesn't. Anyone a clue? > > On Jan 18, 5:20 pm, Stefan Klumpp <[email protected]> wrote: > > > The code below works perfectly for real devices running on 1.5, 1.6 > > and 2.0 as well as the emulator running on 2.1. However, executing it > > on the Nexus One (running 2.1) raises an IOException: > > > java.io.IOException: Unable to parse response from server > > at android.location.Geocoder.getFromLocation(Geocoder.java:124) > > > That's the code snippet where it happens: > > > Double myLatitude = AppObject.myLocation.getLatitude(); > > Double myLongitude = AppObject.myLocation.getLongitude(); > > Geocoder geocoder = new Geocoder(MainActivity.this); > > java.util.List<Address> addressList; > > try { > > addressList = geocoder.getFromLocation(myLatitude, myLongitude, 5); > > if(addressList!=null && addressList.size()>0) { > > currentAddress = new String(); > > currentAddress = addressList.get(0).getAddressLine(0) + ", " > > + addressList.get(0).getAddressLine(1) + ", " > > + addressList.get(0).getAddressLine(2); > > > } > > return true; > > > } catch (IOException e) { > > > e.printStackTrace(); > > return false; > > > } > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

