Hi
When I am sending and receiving the response I got this error:
java.net.SocketException: Permission denied (maybe missing INTERNET
permission)
I am using this
/* makes a request and get the response as string */
String responseStr = null;
HttpClient client = new DefaultHttpClient();
HttpGet httpGetRequest = new HttpGet(url);
HttpResponse response = client.execute(httpGetRequest);
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
response.getEntity().writeTo(os);
responseStr = os.toString();
}
/* parse the string response using the android JSON library */
JSONObject json = new JSONObject(responseStr);
JSONObject feed = (JSONObject) json.get("feed");
JSONArray entry = (JSONArray) feed.get("entry");
int length = entry.length();
http://groups.google.com/group/android-beginners/browse_thread/thread/95628eae896bf206
How can I configured the Internet settings in the Emulator.
Thanks in Advance
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en