Skip to main content

Posts

Showing posts with the label issue

Geocoder is not working, instead use google maps

I noticed that Geocoder does not work for a month in my app. I tested it different simulator and device. But i never get a address. After test i search another method for find address. While i search this, i notice i am not alone with geocoder issue. Other developers use a work arround. I added a few line of code for encoding UTF-8 characters. public static List < Address > getStringFromLocation ( double lat , double lng ) throws ClientProtocolException , IOException , JSONException { String address = String . format (Locale. ENGLISH , "http://maps.googleapis.com/maps/api/geocode/json?latlng=%1$f,%2$f&sensor=false" , lat, lng); HttpGet httpGet = new HttpGet(address); HttpClient client = new DefaultHttpClient(); client.getParams().setParameter(CoreProtocolPNames. HTTP_CONTENT_CHARSET , "UTF-8" ); HttpResponse response; StringBuilder stringBuilder = new StringBuilder(); List<Address> retList = null ;  respo...