Android網路架構技術

來源:互聯網
上載者:User

標籤:

網路相關
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網路架構技術

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.