Hello, I'm quite new to android and try to implement http client to communicate to a REST server. I'm starting with the Get method but I have some problems using android 2.0 on the emulator.
String url = "http://www.google.fr/search?q=android"
HttpClient client = new DefaultHttpClient(new BasicHttpParams());
HttpGet getMethod = new HttpGet((url));
HttpResponse httpResponse = client.execute(getMethod);
HttpEntity = httpResponse.getEntity());
int length = (int) httpEntity.getContentLength();
=> length is -1 :-(
A look into the logs gives me the UnresolvedHostException.
I searched on google and found several guys having the same problem but who didn't find any answer. Is there a particuliar way to configure the android emulator to have this working ? Just to precise, I have added the Internet access in the android manifest.
Thanks a lot for your help. Luc