執行網路作業總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本節所提供的指南說明多項基本工作,這些工作涉及連線到網路、監控網路連線 (包括連線變更),以及讓使用者控管應用程式網路用量。同時也會說明如何剖析及取用 XML 資料。
這些指南說明建立 Android 應用程式的基本構成元素,讓應用程式能有效下載內容及剖析資料,同時將網路流量降到最低。
如要進一步瞭解這個主題,請參閱下列相關指南:
指南
- 連線到網路
- 瞭解如何連線至網路、選擇 HTTP 用戶端,以及在 UI 執行緒之外執行網路作業。
- 管理網路用量
- 瞭解如何檢查裝置的網路連線、建立用於控制網路用量的偏好設定 UI,以及回應連線變更。
- 剖析 XML 資料
- 瞭解如何剖析及取用 XML 資料。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[],[],null,["# Perform network operations overview\n\nThe guides in this section explain the basic tasks involved in connecting to the\nnetwork, monitoring the network connection (including connection changes), and\ngiving users control over an app\\\\'s network usage. They also describe how to\nparse and consume XML data.\n\nThese guides describe the fundamental building blocks for creating Android\napplications that download content and parse data efficiently while minimizing\nnetwork traffic.\n\nTo learn more about this topic, see the following related guides:\n\n- [Reduce network battery drain: Overview](/develop/connectivity/preserving-battery)\n- [Minimize the effect of regular updates](/develop/connectivity/minimize-effect-regular-updates)\n- [Web-based content](/guide/webapps)\n\nGuides\n------\n\n**[Connect to the network](/develop/connectivity/network-ops/connecting)**\n: Learn how to connect to the network, choose an HTTP client, and perform\n network operations outside of the UI thread.\n\n**[Manage network usage](/develop/connectivity/network-ops/managing)**\n: Learn how to check a device\\\\'s network connection, create a preference UI\n for controlling network usage, and respond to connection changes.\n\n**[Parse XML data](/develop/connectivity/network-ops/xml)**\n: Learn how to parse and consume XML data."]]