android环境下的下载程序 我装了个android2.2 sdk 光模拟器启动用了好几个小时。无语中 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 至少在模拟器上要好长时间,而在j2se环境下不到一秒下载完毕了 取到网络资源耗时214ms,两者取数据应该没什么效率上的问题的。我的代码如下: long start = System.currentTimeMillis(); HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost("http://hiphotos.baidu.com/19967918/pic/item/8a1f9821a74bbd9f4623e82f.jpg"); try { HttpResponse response = client.execute(post); if(response != null){ Log.i("test", " cost " + (System.currentTimeMillis() - start)); }else{ Log.i("test", " fail"); } } catch (Exception e) { e.printStackTrace(); } 模拟器根据你pc的ram和cpu性能而定,不可靠,你pc要是2000年的p3的话,可能还要等上几个小时呢 如何在安卓系统里编写辅助程序?? android中http请求的转发 Android Notification如何获得存储在res/raw下音乐文件的音乐效果 自己编的apk 运行不了 android JNI 该怎么学习 ListView中怎么插入网络中的图片,是要重写SimpleAdapter吗? android 关于线程的问题,希望高手给分析一下 请教一个关于读取远程服务器img文件,并显示在GridView中的思路 定义layout,一个按钮在另一个按钮旁边,哪错了 关于安卓分享到社交平台的问题 ViewSwitch 如何显示大文本啊
long start = System.currentTimeMillis();
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://hiphotos.baidu.com/19967918/pic/item/8a1f9821a74bbd9f4623e82f.jpg");
try {
HttpResponse response = client.execute(post);
if(response != null){
Log.i("test", " cost " + (System.currentTimeMillis() - start));
}else{
Log.i("test", " fail");
}
} catch (Exception e) {
e.printStackTrace();
}