1 page.title=Performing Network Operations 2 3 trainingnavtop=true 4 startpage=true 5 next.title=Connecting to the Network 6 next.link=connecting.html 7 8 @jd:body 9 10 <div id="tb-wrapper"> 11 <div id="tb"> 12 13 14 <h2>Dependencies and prerequisites</h2> 15 <ul> 16 <li>Android 1.6 (API level 4) or higher</li> 17 <li>A device that is able to connect to mobile and Wi-Fi networks</li> 18 </ul> 19 20 21 <h2>You should also read</h2> 22 <ul> 23 <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li> 24 <li><a href="{@docRoot}training/efficient-downloads/index.html">Transferring Data Without Draining the Battery</a></li> 25 <li><a href="{@docRoot}guide/webapps/index.html">Web Apps Overview</a></li> 26 </ul> 27 28 29 <h2>Try it out</h2> 30 31 <div class="download-box"> 32 <a href="{@docRoot}shareables/training/NetworkUsage.zip" 33 class="button">Download the sample</a> 34 <p class="filename">NetworkUsage.zip</p> 35 </div> 36 37 </div> 38 </div> 39 40 <p>This class explains the basic tasks involved in connecting to the network, 41 monitoring the network connection (including connection changes), and giving 42 users control over an app's network usage. It also describes how to parse and 43 consume XML data.</p> 44 45 <p>This class includes a sample application that illustrates how to perform 46 common network operations. You can download the sample (to the right) and use it 47 as a source of reusable code for your own application.</p> 48 49 <p>By going through these lessons, you'll have the 50 fundamental building blocks for creating Android applications that download 51 content and parse data efficiently, while minimizing network traffic.</p> 52 53 54 55 <h2>Lessons</h2> 56 57 <dl> 58 <dt><b><a href="connecting.html">Connecting to the Network</a></b></dt> 59 60 <dd>Learn how to connect to the network, choose an HTTP client, and perform 61 network operations outside of the UI thread.</dd> 62 63 <dt><b><a href="managing.html">Managing Network Usage</a></b></dt> 64 65 <dd>Learn how to check a 66 device's network connection, create a preferences UI for controlling network 67 usage, and respond to connection changes.</dd> 68 69 <dt><b><a href="xml.html">Parsing XML Data</a></b></dt> 70 <dd>Learn how to parse and consume XML data.</dd> 71 72 </dl> 73 74