I am trying to comsume a self-hosted WCF service which simply returns a String in JSON format. It takes a very long time around 2-3 minutes to get the response on Android Device, where as on any other computer it works fine. Could anyone help me on this? Thanks in Advance.
Below is my code to access the service.
try{
HttpClient httpclient = new DefaultHttpClient();
HttpGet request = new HttpGet("http://192.168.1.83:8000/GetOffers");
ResponseHandler<String> handler = new BasicResponseHandler();
//you result will be String :
result = httpclient.execute(request, handler);
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}