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");response = client.execute(httpGet);HttpEntity entity = response.getEntity();
InputStream stream = entity.getContent();jsonObject = new JSONObject(stringBuilder.toString());
retList = new ArrayList<Address>();}return retList;}
I hope you can use this helpful. And i update Show The Way. 
Here is change log;
#2.3
FC Bugs fixed
No location issue solved
Unnecessary dialogs removed
No address issue solved
Reduce ads show
Refactor location code
Library update
If you find my blog or apps usefull, please consider donation.
FC Bugs fixed
No location issue solved
Unnecessary dialogs removed
No address issue solved
Reduce ads show
Refactor location code
Library update
If you find my blog or apps usefull, please consider donation.

Comments
Post a Comment