Performing Network Operations -

来源:互联网 发布:淘宝店铺转让合法吗 编辑:程序博客网 时间:2024/06/16 11:16

This class explains the basic tasks involved in connecting to the network, monitoring the network connection (including connection changes), and giving users control over an app's network usage. It also describes how to parse and consume XML data.

This class includes a sample application that illustrates how to perform common network operations. You can download the sample (to the right) and use it as a source of reusable code for your own application.

By going through these lessons, you'll have the fundamental building blocks for creating Android applications that download content and parse data efficiently, while minimizing network traffic.

Note: See the class Transmitting Network Data Using Volleyfor information on Volley, an HTTP library that makes networking for Android apps easier and faster. Volley is available through the open AOSP repository. Volley may be able to help you streamline and improve the performance of your app's network operations.

Lessons


Connecting to the Network
Learn how to connect to the network, choose an HTTP client, and perform network operations outside of the UI thread.
Managing Network Usage
Learn how to check a device's network connection, create a preferences UI for controlling network usage, and respond to connection changes.
Parsing XML Data
Learn how to parse and consume XML data.
0 0
原创粉丝点击