Nagendra1020
Lurker
Hi All,
I am new in android.
I written small program that will connect to server but, it my app getting connect can anybody tell me what is problem.
Code is :
public void http()
{
try
{
URI uri = new URI("http://localhost:8080/TestApp/");
Log.v(TAG,uri.toString());
HttpGet get = new HttpGet(uri);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(get);
Log.v(TAG,response.toString());
}
catch (Exception e) {
// TODO: handle exception
}
I am new in android.
I written small program that will connect to server but, it my app getting connect can anybody tell me what is problem.
Code is :
public void http()
{
try
{
URI uri = new URI("http://localhost:8080/TestApp/");
Log.v(TAG,uri.toString());
HttpGet get = new HttpGet(uri);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(get);
Log.v(TAG,response.toString());
}
catch (Exception e) {
// TODO: handle exception
}