【发布时间】:2012-03-18 15:11:46
【问题描述】:
嗨,
当我通过 wifi 网络使用我的应用程序时,我可以非常快速地下载一些图像
代码如下所示:
URL url = new URL(mAdresse);
mHttpURLConnection = (HttpURLConnection) url.openConnection();
mHttpURLConnection.setDoOutput(true);
mHttpURLConnection.setChunkedStreamingMode(0);
mInputStream = new BufferedInputStream(mHttpURLConnection.getInputStream());
...但是当我在3G+网络上尝试时,下载图片需要很长时间。 应用程序卡在以下命令上很长时间:
mHttpURLConnection.getInputStream()
我一直在寻找为什么这需要这么长时间,几天(和几夜)都没有成功。
我的问题是:为什么要花这么长时间?
【问题讨论】:
标签: android download inputstream httpurlconnection