Can't access server from device, works in emulator
<p>Seems like everyone have issue accessing local machine or internet etc from emulator. All that works for me. Now I got my WCF service installed on my home server, port opened and I can browse just fine with a browser. </p>

<p>I changed URL in emulator, pointed to "real" server and it WORKS. Now, I installed app on device and it times out connecting to server (10 seconds). What do I miss? </p>

<p>Server is IIS7.5 with .NET WCF REST service. Device connected to 3G and I can browse my own site from web browser on device but in code it fails. Code looks like so and my url like "http://domain:8080/mobile/auth"</p>

<p>EDIT: Tried on another phone and it WORKS! What can be a problem? My phone is Nexus S with 2.3, I target 2.2 and my emulator 2.2 And my other phone (which works) also 2.2</p>

<p>Also, one phone on TMobile and another on Sprint. Is that weird issue?</p>

<p>EDIT 2:
Some Google search.. It might be related to T-Mobile blocking port 8080. I do post specifically and when I browse via browser it does GET, so maybe my issue there. I will try on another T-Mobile phone tomorrow.</p>

<pre><code>HttpParams httpParams = new BasicHttpParams();
        HttpConnectionParams.setConnectionTimeout(httpParams, TIMEOUT);
        HttpConnectionParams.setSoTimeout(httpParams, TIMEOUT);

        HttpClient client = new DefaultHttpClient(httpParams);

        HttpPost request = new HttpPost(url);

        try
        {
            StringEntity entity = new StringEntity(requestData);
            entity.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
            request.setEntity(entity);
            ResponseHandler&lt;String&gt; handler = new BasicResponseHandler();
            returnData = client.execute(request, handler);
        }
        catch (Throwable e)
        {
            String s = e.getMessage();
            //TODO: Log exception on device
        }
</code></pre>
