Android开源项目发现--- 工具类网络相关篇(持续更新)

1. Asynchronous Http Client for Android Android异步Http请求
项目地址:https://github.com/loopj/android-async-http
文档介绍:http://loopj.com/android-async-http/
特点:(1) 在匿名回调中处理请求结果
(2) 在UI线程外进行http请求
(3) 文件断点上传
(4) 智能重试
(5) 默认gzip压缩
(6) 支持解析成Json格式
(7) 可将Cookies持久化到SharedPreferences

 

2. android-query 异步加载,更少代码完成Android加载
项目地址:https://github.com/androidquery/androidqueryhttps://code.google.com/p/android-query/
文档介绍:https://code.google.com/p/android-query/#Why_AQuery?
Demo地址:https://play.google.com/store/apps/details?id=com.androidquery
特点:https://code.google.com/p/android-query/#Why_AQuery?

 

3. Async Http Client Java异步Http请求
项目地址:https://github.com/AsyncHttpClient/async-http-client
文档介绍:http://sonatype.github.io/async-http-client/

 

4. Ion 支持图片、json、http post等异步请求

项目地址:https://github.com/koush/ion
文档介绍:https://github.com/koush/ion#more-examples

 

5. HttpCache Http缓存
项目地址:https://github.com/Trinea/AndroidCommon
Demo地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo
Demo代码:https://github.com/Trinea/AndroidDemo/blob/master/src/cn/trinea/android/demo/HttpCacheDemo.java
特点是:(1) 根据cache-control、expires缓存http请求
(2) 支持同步、异步Http请求
(3) 在匿名回调中处理请求结果
(4) 在UI线程外进行http请求
(5) 默认gzip压缩

 

6. Http Request
项目地址:https://github.com/kevinsawicki/http-request
文档介绍:https://github.com/kevinsawicki/http-request#examples

 

7. okhttp square开源的http工具类
项目地址:https://github.com/square/okhttp
文档介绍:http://square.github.io/okhttp/
特点:(1) 支持SPDY(http://zh.wikipedia.org/wiki/SPDY)协议。SPDY协议是Google开发的基于传输控制协议的应用层协议,通过压缩,多路复用(一个TCP链接传送网页和图片等资源)和优先级来缩短加载时间。
(2) 如果SPDY不可用,利用连接池减少请求延迟
(3) Gzip压缩
(4) Response缓存减少不必要的请求

 

8. Retrofit RESTFUL API设计
项目地址:https://github.com/square/retrofit
文档介绍:http://square.github.io/retrofit/


9.Volley Google提供的网络通信库,使得网络请求更简单、更快速

项目地址:https://android.googlesource.com/platform/frameworks/volley

Github地址:https://github.com/mcxiaoke/android-volley

文档地址:http://commondatastorage.googleapis.com/io-2013/presentations/110%20-%20Volley-%20Easy,%20Fast%20Networking%20for%20Android.pdf


10.RoboSpice
Android异步网络请求工具,支持缓存、REST等等
项目地址:https://github.com/stephanenicolas/robospice
Demo地址:https://github.com/stephanenicolas/RoboDemo/downloads

 

posted @ 2014-03-01 13:57  Leo的银弹  阅读(316)  评论(0编辑  收藏  举报