title: Rest with Android 4.0
body: <p>Folks, I have an web service running on my PC, recently I changed my application from 2.2. for 4.0, and after that I cant connect to my WS anymore.</p>
  
  <p>I'm looking for answers and found nothing.</p>
  
  <p>My application refers the URL like this<code>http://10.0.2.2:8080</code>  ... But it dosn't work.</p>
  
  <p>Heres my code:</p>
  
  <pre><code>private static final String URL_WS = "http://10.0.2.2:8080/WS_TaxiShare/)";
  
  
  public String login(String email, String password) throws Exception {
  
      String[] resposta = new WSClient().get(URL_WS + "login/login/?login="+ email +"&amp;password="+ password);
  
      String saida = resposta[1];
      if (resposta[0].equals("200")) {
          return saida;
      } else {
          return saida;
      }
  }
  </code></pre>
  
  <p>Now the WSClient</p>
  
  <pre><code>public class WSClient {
  
      public final String[] get(String url) {
  
          String[] result = new String[2];
          HttpGet httpget = new HttpGet(url);
          HttpResponse response;
  
          try {
          Log.i("Get taxi", "Url -&gt; " + url);
          response = HttpClientSingleton.getHttpClientInstace().execute(httpget);
          HttpEntity entity = response.getEntity();
  
          if (entity != null) {
              result[0] = String.valueOf(response.getStatusLine().getStatusCode());
              InputStream instream = entity.getContent();
              result[1] = toString(instream);
              instream.close();
              Log.i("get", "Result from post JsonPost : " + result[0] + " : " + result[1]);
          }
      } catch (Exception e) {
          Log.i("Exception no get WS taxi", "Exception -&gt;" + e);
          result[0] = "0";
          result[1] = "Falha de rede!";
      }
      return result;
  }
  </code></pre>