Home | History | Annotate | Download | only in samples
      1 page.title=Samples
      2 
      3 @jd:body
      4 
      5 <p>To help you understand some fundamental Android APIs and coding practices, a variety of sample
      6 code is available from the Android SDK Manager.</p>
      7 
      8 <p>To download the samples:</p>
      9 <ol>
     10   <li>Launch the Android SDK Manager.
     11     <ul>
     12       <li>On Windows, double-click the SDK Manager.exe file at the root of the Android SDK
     13 directory.</li>
     14       <li>On Mac or Linux, open a terminal to the {@code tools/} directory in the
     15 Android SDK, then execute {@code android sdk}.</ul>
     16   </li>
     17   <li>Expand the list of packages for the latest Android platform.</li>
     18   <li>Select and download <em>Samples for SDK</em>.</li>
     19 </ol>
     20 
     21 <p>When the download is complete, you can find the samples sources at this location:</p>
     22 
     23 <p style="margin-left:2em">
     24 <code><em>&lt;sdk&gt;</em>/platforms/&lt;android-version>/samples/</code>
     25 </p>
     26 
     27 <p>You can easily create new Android projects with the downloaded samples, modify them
     28 if you'd like, and then run them on an emulator or device. </p>
     29 <!--
     30 <p>Below are summaries for several of the available samples.</p>
     31 -->