开发者

Android Developing - Slow Internet Connection via 3G

I'm developing a Client/Server Application with Android/Rails and Communication via R开发者_Go百科EST Json

When I'm testing my App via Emulator, all works fine. Also when I deploy the app on my phone with WIFI on it works and the speed is ok.

But when I disconnect from WIFI and use the 3G connection, the phone becomes incredible Slow and it takes Minutes du get one JSON Response from the Server.

I'ved debug a little bit and the Problem seems to be the HTTPClient, which execute Method takes ulta long.

Other Apps with Network Access are working perfectly.

Any suggestions what to do?

HTC Magic 
Android 1.6

My Http Connection Code:

HttpClient client = new DefaultHttpClient();
        HttpGet get = new HttpGet("URL");
        try {
            client.execute(get);
        } catch (ClientProtocolException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }


SOLVED: Some Problems with the Port. I changed my Server Port from 3000 to 80 and it works just fine. Thanks for the Comment, that was the great Hint :). Thanks to Chris Stratton


Move to an area with better mobile data coverage?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜