I have successfully returns result of a place details with the code below:
private PlaceDetails getPlaceDetails(String url) throws Exception{
String jsonResults =null;
HttpHelper helper = new HttpHelper();
try {
jsonResults = helper.GetJSonString(url);
// Create a JSON object hierarchy from the results
JSONObject jsonObj = new JSONObject(jsonResults.toString()).getJSONObject("result");
placeDetails = new PlaceDetails();
placeDetails.setName(jsonObj.getString("name"));
placeDetails.setFormatted_address(jsonObj.getString("formatted_address"));
placeDetails.setInternational_phone_number(jsonObj.getString("international_phone_number"));
} catch (JSONException e) {
Log.e("LOG_TAG", "Error processing JSON results " + e.getMessage().toString(), e);
}
return placeDetails;
}
Now, my problem is I dont know how to get lat and lng values out of the result.
Thanks in advance.