標籤:
網路相關
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/androidquery或https://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/
Android網路架構技術