I'm trying to do json parse for getting city state and zipcode. I'm using google api for this.
I debug the below code on two devices android 2.3 and android 4.1.2. in android 2.3 its works fine.but in android 4.1.2 i got runtime error.
here is a my code
String url = "http://maps.google.com/maps/api/geocode/json?address="+address+"&sensor=true";
JSONParser jparser = new JSONParser();
JSONObject jobject = jparser.getJSONFromUrl(url);
try {
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost= new HttpPost(url);
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
is = httpEntity.getContent();
}catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
on the HttpResponse httpResponse = httpClient.execute(httpPost);
line i got an runtime error Source not fount from ActivityThread.performLaunchActivity.
please sort it out my problem