Android:HttpClient does not run in Android 4.0 API

Posted by user1635564 on Stack Overflow See other posts from Stack Overflow or by user1635564
Published on 2012-08-30T09:25:55Z Indexed on 2012/08/30 9:38 UTC
Read the original article Hit count: 171

Filed under:

I have written the code it works on Android 2.2 API but it does not work on Android 4.0

 String url = textUrl.getText().toString();
     HttpClient client = new DefaultHttpClient();
     HttpGet  request = new HttpGet(url);
     try
     {
        HttpResponse response = client.execute(request);
        textResult.setText(HttpHelper.request(response));
     }
     catch (Exception e) {
        // TODO: handle exception
         textResult.setText("Failed");
    }

© Stack Overflow or respective owner

Related posts about android