[android-developers] How to retrieve a JSON object from a php url to my android

2011-04-07 Thread Jennifer
Hi,
I am having this code
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet();
request.setURI(new URI(uri));

HttpResponse response=client.execute(new HttpGet(uri));
InputStream ips  = response.getEntity().getContent();

//String a = String(ips);
BufferedReader buf = new BufferedReader(new
InputStreamReader(ips,"UTF-8"));

And I am having a url like http://site.com/webservice.php that returns
a JSON object. But am not getting the result.Somebody please help. I
want to get the JSON object in my android class.

I have went through almost all questionnaires in this site.

Thanks in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to retrieve a JSON object from a php url to my android

2011-04-07 Thread Jency Johnson
Hi,
I am having this code
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet();
request.setURI(new URI(uri));

HttpResponse response=client.execute(new HttpGet(uri));
InputStream ips  = response.getEntity().getContent();

//String a = String(ips);
BufferedReader buf = new BufferedReader(new
InputStreamReader(ips,"UTF-8"));

But am not getting the result.Somebody please help. I want to get the
JSON object in my android class.

I have went through almost all questionnaires in this site.

Thanks in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en