summaryrefslogtreecommitdiffstats
path: root/docs/html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html')
-rw-r--r--docs/html/guide/appendix/api-levels.jd6
-rw-r--r--docs/html/guide/developing/building/building-cmdline.jd10
-rw-r--r--docs/html/guide/developing/devices/index.jd6
-rw-r--r--docs/html/guide/developing/devices/managing-avds.jd6
-rw-r--r--docs/html/guide/developing/projects/index.jd8
-rw-r--r--docs/html/guide/developing/tools/adt.jd5
-rw-r--r--docs/html/guide/developing/tools/android.jd29
-rw-r--r--docs/html/guide/developing/tools/index.jd4
-rwxr-xr-xdocs/html/guide/market/billing/billing_integrate.jd6
-rw-r--r--docs/html/guide/market/licensing/overview.jd11
-rw-r--r--docs/html/guide/market/licensing/setting-up.jd36
-rw-r--r--docs/html/guide/practices/optimizing-for-3.0.jd8
-rw-r--r--docs/html/guide/practices/screens_support.jd14
-rw-r--r--docs/html/guide/topics/location/index.jd2
-rw-r--r--docs/html/guide/topics/manifest/uses-feature-element.jd2
-rw-r--r--docs/html/guide/tutorials/views/hello-mapview.jd4
-rw-r--r--docs/html/images/efficient-downloads/DDMS.pngbin0 -> 27283 bytes
-rw-r--r--docs/html/images/efficient-downloads/graphs.pngbin0 -> 16550 bytes
-rw-r--r--docs/html/images/efficient-downloads/mobile_radio_state_machine.pngbin0 -> 34338 bytes
-rw-r--r--docs/html/images/screens_support/avds-config.pngbin57962 -> 66660 bytes
-rw-r--r--docs/html/index.jd20
-rw-r--r--docs/html/offline.jd2
-rw-r--r--docs/html/resources/articles/creating-input-method.jd742
-rw-r--r--docs/html/resources/articles/images/inputmethod_composing_text_1.pngbin0 -> 5551 bytes
-rw-r--r--docs/html/resources/articles/images/inputmethod_composing_text_2.pngbin0 -> 5458 bytes
-rw-r--r--docs/html/resources/articles/images/inputmethod_composing_text_3.pngbin0 -> 1888 bytes
-rw-r--r--docs/html/resources/articles/images/inputmethod_lifecycle_image.pngbin0 -> 88902 bytes
-rw-r--r--docs/html/resources/articles/images/inputmethod_numeric_type_screenshot.pngbin0 -> 11814 bytes
-rw-r--r--docs/html/resources/articles/images/inputmethod_subtype_notification.pngbin0 -> 11404 bytes
-rw-r--r--docs/html/resources/articles/images/inputmethod_subtype_preferences.pngbin0 -> 18451 bytes
-rw-r--r--docs/html/resources/articles/images/inputmethod_subtype_settings.pngbin0 -> 16355 bytes
-rw-r--r--docs/html/resources/articles/images/inputmethod_text_type_screenshot.pngbin0 -> 13017 bytes
-rw-r--r--docs/html/resources/resources_toc.cs24
-rw-r--r--docs/html/resources/samples/get.jd8
-rw-r--r--docs/html/resources/tutorials/hello-world.jd4
-rw-r--r--docs/html/resources/tutorials/testing/activity_test.jd2
-rw-r--r--docs/html/sdk/adding-components.jd114
-rw-r--r--docs/html/sdk/android-3.0.jd9
-rw-r--r--docs/html/sdk/compatibility-library.jd6
-rw-r--r--docs/html/sdk/eclipse-adt.jd44
-rw-r--r--docs/html/sdk/index.jd2
-rw-r--r--docs/html/sdk/installing.jd107
-rw-r--r--docs/html/sdk/oem-usb.jd4
-rw-r--r--docs/html/sdk/sdk_toc.cs4
-rw-r--r--docs/html/sdk/win-usb.jd10
-rw-r--r--docs/html/training/efficient-downloads/connectivity_patterns.jd76
-rw-r--r--docs/html/training/efficient-downloads/efficient-network-access.jd170
-rw-r--r--docs/html/training/efficient-downloads/index.jd51
-rw-r--r--docs/html/training/efficient-downloads/redundant_redundant.jd87
-rw-r--r--docs/html/training/efficient-downloads/regular_updates.jd102
50 files changed, 1285 insertions, 460 deletions
diff --git a/docs/html/guide/appendix/api-levels.jd b/docs/html/guide/appendix/api-levels.jd
index cc98f8f..bc7d83b 100644
--- a/docs/html/guide/appendix/api-levels.jd
+++ b/docs/html/guide/appendix/api-levels.jd
@@ -350,11 +350,11 @@ including the latest version, and provides an updater tool that you can use to
download other platform versions as necessary. </p>
<p>To access the updater, use the <code>android</code> command-line tool,
-located in the &lt;sdk&gt;/tools directory. You can launch the Updater by using
-the <code>android</code> command without specifying any options. You can
+located in the &lt;sdk&gt;/tools directory. You can launch the SDK updater by
+executing <code>android sdk</code>. You can
also simply double-click the android.bat (Windows) or android (OS X/Linux) file.
In ADT, you can also access the updater by selecting
-<strong>Window</strong>&nbsp;>&nbsp;<strong>Android SDK and AVD
+<strong>Window</strong>&nbsp;>&nbsp;<strong>Android SDK
Manager</strong>.</p>
<p>To run your application against different platform versions in the emulator,
diff --git a/docs/html/guide/developing/building/building-cmdline.jd b/docs/html/guide/developing/building/building-cmdline.jd
index c43962a..fd90b1a 100644
--- a/docs/html/guide/developing/building/building-cmdline.jd
+++ b/docs/html/guide/developing/building/building-cmdline.jd
@@ -202,12 +202,12 @@ ant release
<ol>
<li>
- <strong>Open the SDK and AVD Manager and launch a virtual device</strong>
+ <strong>Open the AVD Manager and launch a virtual device</strong>
- <p>From your SDK's <code>platform-tools/</code> directory, execute the {@code android} tool with no
- arguments:</p>
+ <p>From your SDK's <code>platform-tools/</code> directory, execute the {@code android} tool
+with the <code>avd</code> options:</p>
<pre>
-android
+android avd
</pre>
<p>In the <em>Virtual Devices</em> view, select an AVD and click <strong>Start</strong>.</p>
@@ -237,7 +237,7 @@ adb -s emulator-5554 install <em>path/to/your/app</em>.apk
</ol>
<p>If you don't see your application on the emulator, try closing the emulator and launching the
- virtual device again from the SDK and AVD Manager. Sometimes when you install an application for the
+ virtual device again from the AVD Manager. Sometimes when you install an application for the
first time, it won't show up in the application launcher or be accessible by other applications.
This is because the package manager usually examines manifests completely only on emulator
startup.</p>
diff --git a/docs/html/guide/developing/devices/index.jd b/docs/html/guide/developing/devices/index.jd
index a7d00f3..64651a1 100644
--- a/docs/html/guide/developing/devices/index.jd
+++ b/docs/html/guide/developing/devices/index.jd
@@ -7,9 +7,9 @@ page.title=Managing Virtual Devices
<p>The easiest way to create an AVD is to use the graphical <a href=
"{@docRoot}guide/developing/devices/managing-avds.html">AVD Manager</a>, which you launch
- from Eclipse by clicking <strong>Window &gt; Android SDK and AVD Manager</strong>. You can also start
- the AVD Manager from the command line by calling the <code>android</code> tool in the <strong>tools</strong>
- directory of the Android SDK.</p>
+ from Eclipse by clicking <strong>Window &gt; AVD Manager</strong>. You can also start the AVD
+Manager from the command line by calling the <code>android</code> tool with the <code>avd</code>
+options, from the <strong>&lt;sdk>/tools/</strong> directory.</p>
<p>You can also create AVDs on the command line by passing the <code>android</code> tool options.
For more information on how to create AVDs in this manner, see <a href=
diff --git a/docs/html/guide/developing/devices/managing-avds.jd b/docs/html/guide/developing/devices/managing-avds.jd
index e70a0bb..412bd91 100644
--- a/docs/html/guide/developing/devices/managing-avds.jd
+++ b/docs/html/guide/developing/devices/managing-avds.jd
@@ -42,8 +42,8 @@ parent.link=index.html
<li>Start the AVD Manager:
<ul>
- <li>In Eclipse: select <strong>Window &gt; Android SDK and AVD Manager</strong>, or click
- the Android SDK and AVD Manager icon in the Eclipse toolbar.</li>
+ <li>In Eclipse: select <strong>Window &gt; AVD Manager</strong>, or click
+ the AVD Manager icon in the Eclipse toolbar.</li>
<li>In other IDEs: Navigate to your SDK's <code>tools/</code> directory and execute the
<code>android</code> tool with no arguments.</li>
@@ -72,7 +72,7 @@ parent.link=index.html
<li>Click <strong>Create AVD</strong>.</li>
</ol>
- <p>Your AVD is now ready and you can either close the SDK and AVD Manager, create more AVDs, or
+ <p>Your AVD is now ready and you can either close the AVD Manager, create more AVDs, or
launch an emulator with the AVD by selecting a device and clicking <strong>Start</strong>.</p>
<h3 id="hardwareopts">Hardware options</h3>
diff --git a/docs/html/guide/developing/projects/index.jd b/docs/html/guide/developing/projects/index.jd
index 63e67cd..b16e466 100644
--- a/docs/html/guide/developing/projects/index.jd
+++ b/docs/html/guide/developing/projects/index.jd
@@ -209,8 +209,8 @@ used.</dd>
application uses code and resources from an example library project called TicTacToeLib.</p>
<p>To download the sample applications and run them as projects in
- your environment, use the <em>Android SDK and AVD Manager</em> to download the "Samples for
- SDK API 8" (or later) component into your SDK.</p>
+ your environment, use the <em>Android SDK Manager</em> to download the "Samples for
+ SDK API 8" (or later) package into your SDK.</p>
<p>For more information and to browse the code of the samples, see
the <a href="{@docRoot}resources/samples/TicTacToeMain/index.html">TicTacToeMain
@@ -227,8 +227,8 @@ used.</dd>
<p class="note"><strong>Note:</strong> You need SDK Tools r14 or newer to use the new library
project feature that generates each library project into its own JAR file.
You can download the tools and platforms using the
- <em>Android SDK and AVD Manager</em>, as described in
- <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</p>
+ <em>Android SDK Manager</em>, as described in
+ <a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.</p>
<p>If you have source code and resources that are common to multiple Android projects, you
can move them to a library project so that it is easier to maintain across applications and
diff --git a/docs/html/guide/developing/tools/adt.jd b/docs/html/guide/developing/tools/adt.jd
index e48a5ae..d473e85 100644
--- a/docs/html/guide/developing/tools/adt.jd
+++ b/docs/html/guide/developing/tools/adt.jd
@@ -102,9 +102,8 @@ Project site.</p>
(<strong>Window &gt; Open Perspective &gt; Traceview</strong>). </li>
<li><a href="{@docRoot}guide/developing/tools/android.html">android</a>: Provides access to
- the Android SDK and AVD Manager. Other <code>android</code> features such as creating or
- updating projects (application and library) are integrated throughout the Eclipse IDE
- (<strong>Window &gt; Android SDK and AVD Manager</strong>). </li>
+ the Android SDK Manager and AVD Manager. Other <code>android</code> features such as creating or
+ updating projects (application and library) are integrated throughout the Eclipse IDE. </li>
<li><a href="{@docRoot}guide/developing/debugging/debugging-ui.html#HierarchyViewer">Hierarchy
Viewer</a>: Allows you to visualize your application's view hierarchy to find inefficiencies
diff --git a/docs/html/guide/developing/tools/android.jd b/docs/html/guide/developing/tools/android.jd
index a67012f..295a720 100644
--- a/docs/html/guide/developing/tools/android.jd
+++ b/docs/html/guide/developing/tools/android.jd
@@ -15,9 +15,16 @@ Line</a>.</li>
the Command Line</a>.</li>
<li>Update your Android SDK with new platforms, add-ons, and documentation. See <a href=
- "{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</li>
+ "{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.</li>
</ul>If you are using Eclipse, the <code>android</code> tool's features are integrated
into ADT, so you should not need to use this tool directly.
+
+ <p class="note"><strong>Note:</strong> The documentation of options below is not exhaustive
+and may be out of date. For the most current list of options, execute <code>android
+--help</code>.</p>
+
+
+
<h2>Syntax</h2>
<pre>android [global options] action [action options]</pre>
@@ -52,6 +59,26 @@ Line</a>.</li>
</tr>
<tr>
+ <td rowspan="6"><code>avd</code></td>
+
+ <td>None</td>
+
+ <td>Launch the AVD Manager</td>
+
+ <td></td>
+ </tr>
+
+ <tr>
+ <td rowspan="6"><code>sdk</code></td>
+
+ <td>None</td>
+
+ <td>Launch the Android SDK Manager</td>
+
+ <td></td>
+ </tr>
+
+ <tr>
<td rowspan="6"><code>create avd</code></td>
<td><code>-n &lt;name&gt;</code></td>
diff --git a/docs/html/guide/developing/tools/index.jd b/docs/html/guide/developing/tools/index.jd
index 3d831f3..5e9f686 100644
--- a/docs/html/guide/developing/tools/index.jd
+++ b/docs/html/guide/developing/tools/index.jd
@@ -12,8 +12,8 @@ latest Android platform.</p>
<h2 id="tools-sdk">SDK Tools</h2>
<p>The SDK tools are installed with the SDK starter package and are periodically updated.
The SDK tools are required if you are developing Android applications. The most important SDK tools
-include the Android SDK and AVD Manager (<code>android</code>), the emulator
-(<code>emulator</code>), and the Dalvik Debug Monitor Server
+include the Android SDK Manager (<code>android sdk</code>), the AVD Manager (<code>android
+avd</code>) the emulator (<code>emulator</code>), and the Dalvik Debug Monitor Server
(<code>ddms</code>). A short summary of some frequently-used SDK tools is provided below.</p>
<dl>
diff --git a/docs/html/guide/market/billing/billing_integrate.jd b/docs/html/guide/market/billing/billing_integrate.jd
index b49dc25..4b3650f 100755
--- a/docs/html/guide/market/billing/billing_integrate.jd
+++ b/docs/html/guide/market/billing/billing_integrate.jd
@@ -149,8 +149,8 @@ relies on these utility classes.</td>
</table>
<p>The in-app billing sample application is available as a downloadable component of the Android
-SDK. To download the sample application component, launch the Android SDK and AVD Manager and then
-select the "Google Market Billing package" component (see figure 1), and click <strong>Install
+SDK. To download the sample application component, launch the Android SDK Manager and then
+select the <strong>Google Market Billing package</strong> component (see figure 1), and click <strong>Install
Selected</strong> to begin the download.</p>
@@ -160,7 +160,7 @@ Selected</strong> to begin the download.</p>
the AIDL file.
</p>
-<p>When the download is complete, the Android SDK and AVD Manager saves the component into the
+<p>When the download is complete, the Android SDK Manager saves the component into the
following directory:</p>
<p><code>&lt;sdk&gt;/extras/google/market_billing/</code></p>
diff --git a/docs/html/guide/market/licensing/overview.jd b/docs/html/guide/market/licensing/overview.jd
index 05a3a40..e7e23f8 100644
--- a/docs/html/guide/market/licensing/overview.jd
+++ b/docs/html/guide/market/licensing/overview.jd
@@ -58,8 +58,9 @@ information about the application and user&mdash;your application and the Google
together to assemble the information and the Google Play client passes it to the server. </p>
<p>To help you add licensing to your application, the Android SDK provides a downloadable set of
-library sources that you can include in your application project: the "Google Market Licensing
-package." The License Verification Library (LVL) is a library you can add to your application that
+library sources that you can include in your application project: the Google Market
+Licensing package. The License Verification Library (LVL) is a library you can add to your
+application that
handles all of the licensing-related communication with the Google Play licensing service. With
the LVL added to your application, your application can determine its licensing status for the
current user by simply calling a method and implementing a callback that receives the status
@@ -116,7 +117,7 @@ tampered with or that are spoofed.</p>
<h2 id="LVL">Licensing Verification Library</h2>
-<p>The Android SDK provides a downloadable component called the "Google Market Licensing package,"
+<p>The Android SDK provides a downloadable package called the Google Market Licensing package,
which includes the License Verification Library (LVL). The LVL greatly simplifies the process of
adding licensing to your application and helps ensure a more secure, robust implementation for your
application. The LVL provides internal classes that handle most of the standard operations of a
@@ -162,8 +163,8 @@ does not cache any response data and allows the application access <em>only</em>
when the server returns a licensed response.</dd>
</dl>
-<p>The LVL is available as a downloadable component of the Android SDK. The
-component includes both the LVL itself and an example application that shows how
+<p>The LVL is available as a downloadable package of the Android SDK. The
+package includes both the LVL itself and an example application that shows how
the library should be integrated with your application and how your application
should manage response data, UI interaction, and error conditions. </p>
diff --git a/docs/html/guide/market/licensing/setting-up.jd b/docs/html/guide/market/licensing/setting-up.jd
index 41e3bc4..0de7819 100644
--- a/docs/html/guide/market/licensing/setting-up.jd
+++ b/docs/html/guide/market/licensing/setting-up.jd
@@ -173,25 +173,25 @@ your application without having publish it. For more information see <a
href="#acct-signin">Signing in to an authorized account</a>, below.</p></li>
</ul>
-<p>Several versions of the add-on are available through the SDK Manager, but only
-<strong>Google APIs Add-On, API 8 (release 2) or higher</strong> includes the necessary Google
+<p>Several versions of the Google APIs add-on are available through the SDK Manager, but only
+the version for Android 2.2 and higher includes the necessary Google
Play services.</p>
<p>To set up an emulator for adding licensing to an application, follow
these steps: </p>
<ol>
- <li>Launch the Android SDK Manager. </li>
- <li>In the <strong>Available Packages</strong> panel, select and download the
-SDK component "Google APIs (Google Inc.) - API Level 8" (or higher) from the SDK
-repository.
- <p>When the download is complete, use the Android SDK Manager to
-create a new AVD based on that component, described next.</p></li>
- <li>In the <strong>Virtual
-Devices</strong> panel of the Android SDK Manager, click
+ <li>Launch the Android SDK Manager (available under the Eclipse <strong>Window</strong>
+menu or by executing {@code &lt;sdk>/tools/android sdk}).</li>
+ <li>Select and download <strong>Google APIs</strong> for the Android version you'd like to target
+(must be Android 2.2 or higher).</li>
+ <li>When the download is complete, open the AVD Manager (available under the Eclipse
+<strong>Window</strong>
+menu or by executing {@code &lt;sdk>/tools/android avd}).</li>
+ <li>Click
<strong>New</strong> and set the configuration details for the new AVD. </li>
<li>In the dialog that appears, assign a descriptive name to the AVD and then
-use the "Target" menu to choose the "Google APIs (Google Inc.) - API Level 8" as
+use the Target menu to choose the <strong>Google APIs</strong> as
the system image to run on the new AVD. Set the other configuration details as
needed and then click <strong>Create AVD</strong> to finish. The SDK tools
create the new AVD configuration, which then appears in the list of available
@@ -238,8 +238,8 @@ greatly simplify the work that you need to do to add licensing to your
application. In all cases, we recommend that you download the LVL and use it as
the basis for the licensing implementation in your application.</p>
-<p>The LVL is available as a downloadable component of the Android SDK. The
-component includes: </p>
+<p>The LVL is available as a downloadable package of the Android SDK. The
+package includes: </p>
<ul>
<li>The LVL sources, stored inside an Android library project. </li>
@@ -248,9 +248,9 @@ project. The example illustrates how an application uses the library helper
classes to check and enforce licensing.</li>
</ul>
-<p>To download the LVL component into your development environment, use the
+<p>To download the LVL package into your development environment, use the
Android SDK Manager. Launch the Android SDK Manager and then
-select the "Google Market Licensing" component, as shown in figure 2.
+select the <strong>Google Market Licensing</strong> package, as shown in figure 2.
Accept the terms and click <strong>Install Selected</strong> to begin the download. </p>
<img src="{@docRoot}images/licensing_package.png" alt=""/>
@@ -265,8 +265,8 @@ the LVL library project and the example application into these directories: </p>
<code>&lt;<em>sdk</em>&gt;/extras/google/market_licensing/sample/</code>&nbsp;&nbsp;(the example
application)</p>
-<p>If you aren't familiar with how to download components into your SDK, see the
-<a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>
+<p>If you aren't familiar with how to download packess into your SDK, see the
+<a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>
document. </p>
@@ -676,7 +676,7 @@ credentials. </p>
<ol>
<li>Open Settings &gt; Accounts &amp; sync</li>
-<li>Select <strong>Add Account</strong> and choose to add a "Google" account.
+<li>Select <strong>Add Account</strong> and choose to add a Google account.
</li>
<li>Select <strong>Next</strong> and then <strong>Sign in</strong>.</li>
<li>Enter the username and password of either the publisher account or a test
diff --git a/docs/html/guide/practices/optimizing-for-3.0.jd b/docs/html/guide/practices/optimizing-for-3.0.jd
index 140c50c..d6c621e 100644
--- a/docs/html/guide/practices/optimizing-for-3.0.jd
+++ b/docs/html/guide/practices/optimizing-for-3.0.jd
@@ -108,7 +108,7 @@ SDK with the new platform:</p>
SDK starter package now</a>.)</p>
<ol>
- <li><a href="{@docRoot}sdk/adding-components.html#launching">Launch the Android SDK and AVD
+ <li><a href="{@docRoot}sdk/adding-components.html#launching">Launch the Android SDK
Manager</a> and install the following:
<ul>
<li>SDK Platform Android 3.0</li>
@@ -147,7 +147,7 @@ Android 3.0, the emulator is still best way to evaluate your application's appea
functionality on Android 3.0.</p>
<p class="note"><strong>Tip:</strong> To improve the startup time for the emulator, enable snapshots
-for the AVD when you create it with the SDK and AVD Manager (there's a checkbox in the AVD creator
+for the AVD when you create it with the AVD Manager (there's a checkbox in the AVD creator
to <strong>Enable</strong> snapshots). Then, start the AVD from the AVD manager and check <b>Launch
from snapshot</b> and <b>Save to snapshot</b>. This way, when you close the emulator, a snapshot of
the AVD state is saved and used to quickly relaunch the AVD next time. However, when you choose to
@@ -281,7 +281,7 @@ to help you add features from Android 3.0 without requiring you to change your <
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a>
or build target, we're providing a static library called the <a
href="{@docRoot}sdk/compatibility-library.html">Compatibility Library</a>
-(downloadable from the AVD and SDK Manager).</p>
+(downloadable from the Android SDK Manager).</p>
<p>This library includes APIs for <a
href="{@docRoot}guide/topics/fundamentals/fragments.html">fragments</a>, <a
href="{@docRoot}guide/topics/fundamentals/loaders.html">loaders</a>, and some updated classes. By
@@ -421,7 +421,7 @@ href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p>
href="{@docRoot}sdk/android-3.0.html#api">Android 3.0 Platform</a> document also have accompanying
samples that allow you to preview the effects and can help you understand how to use them. To get
the samples, download them from the SDK repository <a href="{@docRoot}sdk/adding-components.html"
->using the Android SDK and AVD Manager</a>. After downloading the samples ("Samples for SDK API
+>using the Android SDK Manager</a>. After downloading the samples ("Samples for SDK API
11"), you can find them in <code>&lt;sdk_root&gt;/samples/android-11/</code>. The following list
provides links to the browsable source code for some of the samples:</p>
diff --git a/docs/html/guide/practices/screens_support.jd b/docs/html/guide/practices/screens_support.jd
index 29dff26..a870b22 100644
--- a/docs/html/guide/practices/screens_support.jd
+++ b/docs/html/guide/practices/screens_support.jd
@@ -1242,12 +1242,12 @@ have to buy various devices just to test your application's screen support.</p>
<p>To set up an environment for testing your application's screen support, you should create a
series of AVDs (Android Virtual Devices), using emulator skins and screen configurations that
emulate the screen sizes and densities you want your application to support. To do so, you can use
-the Android SDK and AVD Manager to create the AVDs and launch them with a graphical interface.</p>
+the AVD Manager to create the AVDs and launch them with a graphical interface.</p>
-<p>To launch the Android SDK and AVD Manager, execute the {@code
+<p>To launch the Android SDK Manager, execute the {@code
SDK Manager.exe} from your Android SDK directory (on Windows only) or execute {@code android} from
-the {@code &lt;sdk&gt;/tools/} directory (on all platforms). Figure 6 shows the Android SDK and
-AVD Manager with a selection of AVDs, for testing various screen configurations.</p>
+the {@code &lt;sdk&gt;/tools/} directory (on all platforms). Figure 6 shows the AVD
+Manager with a selection of AVDs, for testing various screen configurations.</p>
<p>Table 3 shows the various emulator skins that are available in the Android SDK, which you can use
to emulate some of the most common screen configurations.</p>
@@ -1340,7 +1340,7 @@ dashboard.</p>
<div class="figure" style="width:204px">
<img src="{@docRoot}images/screens_support/avd-start.png" alt="" />
<p class="img-caption"><strong>Figure 7.</strong>
- Size and density options you can set, when starting an AVD from the Android SDK and AVD
+ Size and density options you can set, when starting an AVD from the AVD
Manager.</p>
</div>
@@ -1349,12 +1349,12 @@ up to run at a physical size that closely matches an actual device. This makes
it a lot easier to compare the results at various sizes and densities. To
do so you need to know the approximate density, in dpi, of your computer
monitor (for instance, a 30" Dell monitor has a density of about 96 dpi). When you launch an AVD
-from the Android SDK and AVD Manager, you can specify the screen size for the emulator and your
+from the AVD Manager, you can specify the screen size for the emulator and your
monitor dpi in the Launch Options, as shown in figure 7.</p>
<p>If you would like to test your application on a screen that uses a resolution
or density not supported by the built-in skins, you can create an AVD that uses a custom resolution
-or density. When creating the AVD from the Android SDK and AVD Manager, specify the Resolution,
+or density. When creating the AVD from the AVD Manager, specify the Resolution,
instead of selecting a Built-in Skin.</p>
<p>If you are launching your AVD from the command line, you can specify the scale for
diff --git a/docs/html/guide/topics/location/index.jd b/docs/html/guide/topics/location/index.jd
index 5f98902..8a2e9cd 100644
--- a/docs/html/guide/topics/location/index.jd
+++ b/docs/html/guide/topics/location/index.jd
@@ -98,7 +98,7 @@ Google APIs add-on, visit</p>
href="http://code.google.com/android/add-ons/google-apis">http://code.google.com/android/add-ons/google-apis</a></p>
<p>For your convenience, the Google APIs add-on is also available as a downloadable component from
-the Android SDK and AVD Manager (see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
+the Android SDK Manager (see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
Components</a>).</p>
<p class="note"><strong>Note:</strong> In order to display Google Maps data in a
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd
index 9175566..5f0a501 100644
--- a/docs/html/guide/topics/manifest/uses-feature-element.jd
+++ b/docs/html/guide/topics/manifest/uses-feature-element.jd
@@ -501,7 +501,7 @@ If you are using SDK Tools r8 or higher, you can find <code>aapt</code> in the
<p class="note"><strong>Note:</strong> You must use the version of
<code>aapt</code> that is provided for the latest Platform-Tools component available. If
you do not have the latest Platform-Tools component, download it using the <a
-href="{@docRoot}sdk/adding-components.html">Android SDK and AVD Manager</a>.
+href="{@docRoot}sdk/adding-components.html">Android SDK Manager</a>.
</p></li>
<li>Run <code>aapt</code> using this syntax: </li>
</ol>
diff --git a/docs/html/guide/tutorials/views/hello-mapview.jd b/docs/html/guide/tutorials/views/hello-mapview.jd
index 458db4f..5217b6b 100644
--- a/docs/html/guide/tutorials/views/hello-mapview.jd
+++ b/docs/html/guide/tutorials/views/hello-mapview.jd
@@ -14,8 +14,8 @@ location:</p>
href="http://code.google.com/android/add-ons/google-apis">http://code.google.com/android/add-ons/google-apis</a></p>
<p>The Google APIs add-on requires Android 1.5 SDK or later release. After
-installing the add-on in your SDK, set your project properties to use the build
-target called "Google APIs Add-on". See the instructions for setting a build
+installing the add-on in your SDK, set your project properties to use a <strong>Google
+APIs</strong> build target. See the instructions for setting a build
target in <a href="{@docRoot}guide/developing/eclipse-adt.html">Developing in
Eclipse with ADT</a> or <a
href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>,
diff --git a/docs/html/images/efficient-downloads/DDMS.png b/docs/html/images/efficient-downloads/DDMS.png
new file mode 100644
index 0000000..e7b0b94
--- /dev/null
+++ b/docs/html/images/efficient-downloads/DDMS.png
Binary files differ
diff --git a/docs/html/images/efficient-downloads/graphs.png b/docs/html/images/efficient-downloads/graphs.png
new file mode 100644
index 0000000..65faeaa
--- /dev/null
+++ b/docs/html/images/efficient-downloads/graphs.png
Binary files differ
diff --git a/docs/html/images/efficient-downloads/mobile_radio_state_machine.png b/docs/html/images/efficient-downloads/mobile_radio_state_machine.png
new file mode 100644
index 0000000..e06608b
--- /dev/null
+++ b/docs/html/images/efficient-downloads/mobile_radio_state_machine.png
Binary files differ
diff --git a/docs/html/images/screens_support/avds-config.png b/docs/html/images/screens_support/avds-config.png
index 3af1c39..c7d534c 100644
--- a/docs/html/images/screens_support/avds-config.png
+++ b/docs/html/images/screens_support/avds-config.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 787a655..d3203bb 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -53,28 +53,32 @@ Android apps!</p>
<p><a href="{@docRoot}sdk/index.html">Learn more &raquo;</a></p>
</td>
</tr>
+
+
<tr>
<td colspan="2"><div class="seperator">&nbsp;</div></td>
</tr>
<tr>
- <td class="imageCell"><a href="http://play.google.com/apps/publish"><img src="{@docRoot}assets/images/icon_play.png" style="padding:0" /></a></td>
+ <td class="imageCell"><a href="{@docRoot}design/index.html"><img src="{@docRoot}assets/images/icon_design.png" style="padding:5px" /></a></td>
<td>
- <h2 class="green">Publish</h2>
- <p>Google Play is an open service that lets you distribute your apps to devices.</p>
- <p><a href="http://play.google.com/apps/publish">Learn more &raquo;</a></p>
+ <h2 class="green">Design</h2>
+ <p>Learn about principles, building blocks, and patterns for creating world-class Android user interfaces.</p>
+ <p><a href="{@docRoot}design/index.html">Learn more &raquo;</a></p>
</td>
</tr>
+
<tr>
<td colspan="2"><div class="seperator">&nbsp;</div></td>
</tr>
<tr>
- <td class="imageCell"><a href="http://source.android.com"><img src="{@docRoot}assets/images/icon_contribute.jpg" style="padding:0" /></a></td>
+ <td class="imageCell"><a href="http://play.google.com/apps/publish"><img src="{@docRoot}assets/images/icon_play.png" style="padding:0" /></a></td>
<td>
- <h2 class="green">Contribute</h2>
- <p>Android Open Source Project gives you access to the entire platform source.</p>
- <p><a href="http://source.android.com">Learn more &raquo;</a></p>
+ <h2 class="green">Publish</h2>
+ <p>Google Play is an open service that lets you distribute your apps to devices.</p>
+ <p><a href="http://play.google.com/apps/publish">Learn more &raquo;</a></p>
</td>
</tr>
+
<tr>
<td colspan="2"><div class="seperator">&nbsp;</div></td>
</tr>
diff --git a/docs/html/offline.jd b/docs/html/offline.jd
index 5f8e37ce..edd8eb0 100644
--- a/docs/html/offline.jd
+++ b/docs/html/offline.jd
@@ -40,7 +40,7 @@ tools</li>
<p>Follow the guide to <a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a>, which
will help you setup your development environment.</p>
-<h3>If you've installed new SDK components using the SDK and AVD Manager</h3>
+<h3>If you've installed new SDK components using the Android SDK Manager</h3>
<p>There's no additional setup.</p>
diff --git a/docs/html/resources/articles/creating-input-method.jd b/docs/html/resources/articles/creating-input-method.jd
index e4b77f4..84c2704 100644
--- a/docs/html/resources/articles/creating-input-method.jd
+++ b/docs/html/resources/articles/creating-input-method.jd
@@ -3,248 +3,526 @@ parent.title=Articles
parent.link=../browser.html?tag=article
@jd:body
-
<div id="qv-wrapper">
<div id="qv">
-
- <h2>See also</h2>
- <ol>
- <li><a href="{@docRoot}resources/articles/on-screen-inputs.html">Onscreen Input Methods</a></li>
- <li><a href="{@docRoot}resources/samples/SoftKeyboard/index.html">Soft Keyboard sample</a></li>
- </ol>
-
+<h2>See also</h2>
+<ol>
+ <li>
+ <a href="{@docRoot}resources/articles/on-screen-inputs.html">Onscreen Input Methods</a>
+ </li>
+ <li>
+ <a href="{@docRoot}resources/samples/SoftKeyboard/index.html">Soft Keyboard sample</a>
+ </li>
+</ol>
</div>
</div>
-
-
-<p>To create an input method (IME) for entering text into text fields
-and other Views, you need to extend the {@link android.inputmethodservice.InputMethodService}.
-class. This class provides much of the basic implementation for an input
-method, in terms of managing the state and visibility of the input method and
-communicating with the currently visible activity.</p>
-
-<p>A good starting point would be the SoftKeyboard sample code provided as part
-of the SDK. You can modify the sample code to start building your own input
-method.</p>
-
-<p>An input method is packaged like any other application or service. In the
-<code>AndroidManifest.xml</code> file, you declare the input method as a
-service, with the appropriate intent filter and any associated meta data:</p>
-
-<pre>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.example.fastinput"&gt;
-
- &lt;application android:label="@string/app_label"&gt;<br>
- &lt;!-- Declares the input method service --&gt;
- &lt;service android:name="FastInputIME"
- android:label="@string/fast_input_label"
- android:permission="android.permission.BIND_INPUT_METHOD"&gt;
- &lt;intent-filter&gt;
- &lt;action android:name="android.view.InputMethod" /&gt;
- &lt;/intent-filter&gt;
- &lt;meta-data android:name="android.view.im" android:resource="@xml/method" /&gt;
- &lt;/service&gt;
-
- &lt;!-- Optional activities. A good idea to have some user settings. --&gt;
- &lt;activity android:name="FastInputIMESettings" android:label="@string/fast_input_settings"&gt;
- &lt;intent-filter&gt;
- &lt;action android:name="android.intent.action.MAIN"/&gt;
- &lt;/intent-filter&gt;
- &lt;/activity&gt;
- &lt;/application&gt;
-&lt;/manifest&gt;</pre>
-
-<p>If your input method allows the user to tweak some settings, you should
-provide a settings activity that can be launched from the Settings application.
-This is optional and you may choose to provide all user settings directly in
-your IME's UI.</p>
-
-<p>The typical life-cycle of an <code>InputMethodService</code> looks like
-this:</p>
-
-<p><img src="images/ime_003.png" style="border: medium none ; width: 374px; height: 871px;"></p>
-
-<h3>Visual Elements</h3>
-
-<p>There are two main visual elements for an input method—the input view and the
-candidates view. You don't have to follow this style though, if one of them is
-not relevant to your input method experience.</p>
-
-<h4>Input View</h4>
-
-<p>This is where the user can input text either in the form of keypresses,
-handwriting or other gestures. When the input method is displayed for the first
-time, <code>InputMethodService.onCreateInputView()</code> will be called. Create
-and return the view hierarchy that you would like to display in the input method
-window.</p>
-
-<h4>Candidates View</h4>
-
-<p>This is where potential word corrections or completions are presented to the
-user for selection. Again, this may or may not be relevant to your input method
-and you can return <code>null</code> from calls to
-<code>InputMethodService.onCreateCandidatesView()</code>, which is the default
-behavior.</p>
-
-<h3>Designing for the different Input Types</h3>
-
-<p>An application's text fields can have different input types specified on
-them, such as free form text, numeric, URL, email address and search. When you
-implement a new input method, you need to be aware of the different input types.
-Input methods are not automatically switched for different input types and so
-you need to support all types in your IME. However, the IME is not responsible
-for validating the input sent to the application. That's the responsibility of
-the application.</p>
-
-<p>For example, the LatinIME provided with the Android platform provides
-different layouts for text and phone number entry:</p>
-
-<p><img style="margin: 0pt 10px 0pt 0pt; width: 319px; height: 198px;" src="images/ime_002.png"><img style="width: 320px; height: 199px;" src="images/ime.png"></p>
-
-<p><code>InputMethodService.onStartInputView()</code> is called with an<code>
-EditorInfo</code> object that contains details about the input type and other
-attributes of the application's text field.</p><p>(<code>EditorInfo.inputType
-&amp; EditorInfo.TYPE_CLASS_MASK</code>) can be one of many different values,
-including:</p>
-
+<p>
+ An input method editor (IME) is a user control that enables users to enter text. Android
+ provides an extensible input method framework that allows applications to provide users
+ alternative input methods, such as on-screen keyboards or even speech input. Once installed,
+ users can select which IME they want to use from the system settings and use it across the
+ entire system; only one IME may be enabled at a time.
+</p>
+<p>
+ To add an IME to the Android system, you create an Android application
+ containing a class that extends {@link android.inputmethodservice.InputMethodService}. In
+ addition, you usually create a "settings" activity that passes options to the IME
+ service. You can also define a settings UI that's displayed as part of the system settings.
+</p>
+<p>This article covers the following:</p>
<ul>
-<li><code>TYPE_CLASS_NUMBER</code></li>
-<li><code>TYPE_CLASS_DATETIME</code></li>
-<li><code>TYPE_CLASS_PHONE</code></li>
-<li><code>TYPE_CLASS_TEXT</code></li>
+ <li>The IME lifecycle.</li>
+ <li>Declaring IME components in the application manifest.</li>
+ <li>The IME API.</li>
+ <li>Designing an IME UI.</li>
+ <li>Sending text from an IME to an application.</li>
+ <li>Working with IME subtypes.</li>
</ul>
+<p>
+ If you haven't worked with IMEs before, you should read the introductory article
+ <a href="{@docRoot}resources/articles/on-screen-inputs.html">Onscreen Input Methods</a> first.
+ Also, the Soft Keyboard sample app included in the SDK contains sample code that you can modify
+ to start building your own IME.
+</p>
+<h2 id="InputMethodLifecycle">The IME Lifecycle</h2>
+<p>
+ The following diagram describes the life cycle of an IME:
+</p>
+<img src="{@docRoot}resources/articles/images/inputmethod_lifecycle_image.png" alt="" height="845"
+ id="figure1" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> The life cycle of an IME.
+</p>
+<p>
+ The following sections describe how to implement the UI and code associated with an IME that
+ follows this lifecycle.
+</p>
+<h2 id="DefiningIME">Declaring IME Components in the Manifest</h2>
+<p>
+ In the Android system, an IME is an Android application that contains a special IME service.
+ The application's manifest file must declare the service, request the necessary permissions,
+ provide an intent filter that matches the action <code>action.view.InputMethod</code>, and
+ provide metadata that defines characteristics of the IME. In addition, to provide a settings
+ interface that allows the user to modify the behavior of the IME, you can define a "settings"
+ activity that can be launched from System Settings.
+</p>
+<p>
+ The following snippet declares IME service. It requests the permission {@link
+ android.Manifest.permission#BIND_INPUT_METHOD} to allow the service to connect the IME to
+ the system, sets up an intent filter that matches the action
+ <code>android.view.InputMethod</code>, and defines metadata for the IME:
+</p>
+<pre>
+&lt;!-- Declares the input method service --&gt;
+ &lt;service android:name="FastInputIME"
+ android:label="&#64;string/fast_input_label"
+ android:permission="android.permission.BIND_INPUT_METHOD"&gt;
+ &lt;intent-filter&gt;
+ &lt;action android:name="android.view.InputMethod" /&gt;
+ &lt;/intent-filter&gt;
+ &lt;meta-data android:name="android.view.im" android:resource="&#64;xml/method" /&gt;
+ &lt;/service&gt;
+</pre>
+<p>
+ This next snippet declares the settings activity for the IME. It has an intent filter for
+ {@link android.content.Intent#ACTION_MAIN} that indicates this activity is the main entry point
+ for the IME application:</p>
+<pre>
+ &lt;!-- Optional: an activity for controlling the IME settings --&gt;
+ &lt;activity android:name="FastInputIMESettings"
+ android:label="&#64;string/fast_input_settings"&gt;
+ &lt;intent-filter&gt;
+ &lt;action android:name="android.intent.action.MAIN"/&gt;
+ &lt;/intent-filter&gt;
+ &lt;/activity&gt;
+</pre>
+<p>
+ You can also provide access to the IME's settings directly from its UI.
+</p>
+<h2 id="IMEAPI">The Input Method API</h2>
+<p>
+ Classes specific to IMEs are found in the {@link android.inputmethodservice} and {@link
+ android.view.inputmethod} packages. The {@link android.view.KeyEvent} class is important for
+ handling keyboard characters.
+</p>
+<p>
+ The central part of an IME is a service component, a class that extends
+ {@link android.inputmethodservice.InputMethodService}. In addition to implementing the
+ normal service lifecycle, this class has callbacks for providing your IME's UI, handling user
+ input, and delivering text to the field that currently has focus. By default, the
+ {@link android.inputmethodservice.InputMethodService} class provides most of the implementation
+ for managing the state and visibility of the IME and communicating with the current
+ input field.
+</p>
+<p>
+ The following classes are also important:
+</p>
+<dl>
+ <dt>{@link android.view.inputmethod.BaseInputConnection}</dt>
+ <dd>
+ Defines the communication channel from an {@link android.view.inputmethod.InputMethod}
+ back to the application that is receiving its input. You use it to read text around the
+ cursor, commit text to the text box, and send raw key events to the application.
+ Applications should extend this class rather than implementing the base interface
+ {@link android.view.inputmethod.InputConnection}.
+ </dd>
+ <dt>{@link android.inputmethodservice.KeyboardView}</dt>
+ <dd>
+ An extension of {@link android.view.View} that renders a keyboard and responds to user
+ input events. The keyboard layout is specified by an instance of
+ {@link android.inputmethodservice.Keyboard}, which you can define in an XML file.
+ </dd>
+</dl>
+<h2 id="IMEUI">Designing the Input Method UI</h2>
+<p>
+ There are two main visual elements for an IME: the <strong>input</strong> view and the
+ <strong>candidates</strong> view. You only have to implement the elements that are relevant to
+ the input method you're designing.
+</p>
+<h3 id="InputView">Input view</h3>
+<p>
+ The input view is the UI where the user inputs text, in the form of keyclicks, handwriting or
+ gestures. When the iIME is displayed for the first time, the system calls the
+ {@link android.inputmethodservice.InputMethodService#onCreateInputView()} callback. In your
+ implementation of this method, you create the layout you want to display in the IME
+ window and return the layout to the system. This snippet is an example of implementing the
+ {@link android.inputmethodservice.InputMethodService#onCreateInputView()} method:
+<pre>
+ &#64;Override
+ public View onCreateInputView() {
+ MyKeyboardView inputView =
+ (MyKeyboardView) getLayoutInflater().inflate( R.layout.input, null);
+
+ inputView.setOnKeyboardActionListener(this); inputView.setKeyboard(mLatinKeyboard);
+
+ return mInputView;
+ }
+</pre>
+<p>
+ In this example, {@code MyKeyboardView} is an instance of a custom implementation of
+ {@link android.inputmethodservice.KeyboardView} that renders a
+ {@link android.inputmethodservice.Keyboard}. If you’re building a traditional QWERTY keyboard,
+ see the <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample
+ app for an example of how to extend the {@link android.inputmethodservice.KeyboardView} class.
+</p>
+<h3 id="CandidateView">Candidates view</h3>
+<p>
+ The candidates view is the UI where the IME displays potential word corrections or
+ suggestions for the user to select. In the IME lifecycle, the system calls
+ {@link android.inputmethodservice.InputMethodService#onCreateCandidatesView()} when it's ready
+ to display the candidate view. In your implementation of this method, return a layout that shows
+ word suggestions, or return null if you don’t want to show anything (a null response is the
+ default behavior, so you don’t have to implement this if you don’t provide suggestions).</p>
+<p>
+ For an example implementation that provides user suggestions, see the
+ <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample app.
+</p>
+<h3 id="DesignConsiderations">UI design considerations</h3>
+<p>
+ This section describes some specific UI design considerations for IMEs.
+</p>
+<h4>Handling multiple screen sizes</h4>
+<p>
+ The UI for your IME must be able to scale for different screen sizes, and it also
+ must handle both landscape and portrait orientations. In non-fullscreen IME mode, leave
+ sufficient space for the application to show the text field and any associated context, so that
+ no more than half the screen is occupied by the IME. In fullscreen IME mode this is not an
+ issue.
+</p>
+<h4>Handling different input types</h4>
+<p>
+ Android text fields allow you to set a specific input type, such as free form text, numbers,
+ URLs, email addresses, and search strings. When you implement a new IME, you need to
+ detect the input type of each field and provide the appropriate interface for it. However, you
+ don't have to set up your IME to check that the user entered text that's valid for the
+ input type; that's the responsibility of the application that owns the text field.
+</p>
+<p>
+ For example, here are screenshots of the interfaces that the Latin IME provided with the
+ Android platform provides for text and phone number inputs:
+</p>
+<img src="{@docRoot}resources/articles/images/inputmethod_text_type_screenshot.png" alt=""
+ height="142" id="figure2" />
+<img src="{@docRoot}resources/articles/images/inputmethod_numeric_type_screenshot.png" alt=""
+ height="120" id="figure2a" />
+<p class="img-caption">
+ <strong>Figure 2.</strong> Latin IME input types.
+</p>
+<p>
+ When an input field receives focus and your IME starts, the system calls
+ {@link android.inputmethodservice.InputMethodService#onStartInputView(EditorInfo, boolean)
+ onStartInputView()}, passing in an {@link android.view.inputmethod.EditorInfo} object that
+ contains details about the input type and other attributes of the text field. In this object,
+ the {@link android.view.inputmethod.EditorInfo#inputType} field contains the text field's input
+ type.
+</p>
+<p>
+ The {@link android.view.inputmethod.EditorInfo#inputType} field is an <code>int</code>
+ that contains bit patterns for various input type settings. To test it for the text field's
+ input type, mask it with the constant {@link android.text.InputType#TYPE_MASK_CLASS}, like
+ this:
+</p>
+<pre>
+inputType &amp; InputType.TYPE_MASK_CLASS
+</pre>
+<p>
+The input type bit pattern can have one of several values, including:
+</p>
+<dl>
+ <dt>{@link android.text.InputType#TYPE_CLASS_NUMBER}</dt>
+ <dd>
+ A text field for entering numbers. As illustrated in the previous screen shot, the
+ Latin IME displays a number pad for fields of this type.
+ </dd>
+ <dt>{@link android.text.InputType#TYPE_CLASS_DATETIME}</dt>
+ <dd>
+ A text field for entering a date and time.
+ </dd>
+ <dt>{@link android.text.InputType#TYPE_CLASS_PHONE}</dt>
+ <dd>
+ A text field for entering telephone numbers.
+ </dd>
+ <dt>{@link android.text.InputType#TYPE_CLASS_TEXT}</dt>
+ <dd>
+ A text field for entering all supported characters.
+ </dd>
+</dl>
+<p>
+ These constants are described in more detail in the reference documentation for
+ {@link android.text.InputType}.
+</p>
+<p>
+ The {@link android.view.inputmethod.EditorInfo#inputType} field can contain other bits that
+ indicate a variant of the text field type, such as:
+</p>
+<dl>
+ <dt>{@link android.text.InputType#TYPE_TEXT_VARIATION_PASSWORD}</dt>
+ <dd>
+ A variant of {@link android.text.InputType#TYPE_CLASS_TEXT} for entering passwords. The
+ input method will display dingbats instead of the actual text.
+ </dd>
+ <dt>{@link android.text.InputType#TYPE_TEXT_VARIATION_URI}</dt>
+ <dd>
+ A variant of {@link android.text.InputType#TYPE_CLASS_TEXT} for entering web URLs and
+ other Uniform Resource Identifiers (URIs).
+ </dd>
+ <dt>{@link android.text.InputType#TYPE_TEXT_FLAG_AUTO_COMPLETE}</dt>
+ <dd>
+ A variant of {@link android.text.InputType#TYPE_CLASS_TEXT} for entering text that the
+ application "auto-completes" from a dictionary, search, or other facility.
+ </dd>
+</dl>
+<p>
+ Remember to mask {@link android.view.inputmethod.EditorInfo#inputType} with the appropriate
+ constant when you test for these variants. The available mask constants are listed in the
+ reference documentation for {@link android.text.InputType}.
+</p>
+<p class="caution">
+ <strong>Caution:</strong> In your own IME, make sure you handle text correctly when you send it
+ to a password field. Hide the password in your UI both in the input view and in the candidates
+ view. Also remember that you shouldn't store passwords on a device. To learn more, see the <a
+ href="{@docRoot}guide/practices/security.html">Designing for Security</a> guide.
+</p>
+<h2 id="SendText">Sending Text to the Application</h2>
+<p>
+ As the user inputs text with your IME, you can send text to the application by
+ sending individual key events or by editing the text around the cursor in the application's text
+ field. In either case, you use an instance of {@link android.view.inputmethod.InputConnection}
+ to deliver the text. To get this instance, call
+ {@link android.inputmethodservice.InputMethodService#getCurrentInputConnection
+ InputMethodService.getCurrentInputConnection()}.
+</p>
+<h3 id="EditingCursor">Editing the text around the cursor</h3>
+<p>
+ When you're handling the editing of existing text in a text field, some of the more useful
+ methods in {@link android.view.inputmethod.BaseInputConnection} are:
+</p>
+<dl>
+ <dt>
+ {@link android.view.inputmethod.BaseInputConnection#getTextBeforeCursor(int, int)
+ getTextBeforeCursor()}</dt>
+ <dd>
+ Returns a {@link java.lang.CharSequence} containing the number of requested characters
+ before the current cursor position.
+ </dd>
+ <dt>
+ {@link android.view.inputmethod.BaseInputConnection#getTextAfterCursor(int, int)
+ getTextAfterCursor()}
+ </dt>
+ <dd>
+ Returns a {@link java.lang.CharSequence} containing the number of requested characters
+ following the current cursor position.
+ </dd>
+ <dt>
+ {@link android.view.inputmethod.BaseInputConnection#deleteSurroundingText(int, int)
+ deleteSurroundingText()}
+ </dt>
+ <dd>
+ Deletes the specified number of characters before and following the current cursor
+ position.
+ </dd>
+ <dt>
+ {@link android.view.inputmethod.BaseInputConnection#commitText(CharSequence, int)
+ commitText()}
+ </dt>
+ <dd>
+ Commit a {@link java.lang.CharSequence} to the text field and set a new cursor
+ position.
+ </dd>
+</dl>
+<p>
+ For example, the following snippet shows how to replace the text "Fell" to the left of the
+ with the text "Hello!":
+</p>
+<pre>
+ InputConnection ic = getCurrentInputConnection();
+
+ ic.deleteSurroundingText(4, 0);
+
+ ic.commitText("Hello", 1);
+
+ ic.commitText("!", 1);
+</pre>
+<h3 id="ComposeThenCommit">Composing text before committing</h3>
+<p>
+ If your IME does text prediction or requires multiple steps to compose a glyph or
+ word, you can show the progress in the text field until the user commits the word, and then you
+ can replace the partial composition with the completed text. You may give special treatment to
+ the text by adding a "span" to it when you pass it to InputConnection#setComposingText().
+</p>
+<p>
+ The following snippet shows how to show progress in a text field:
+</p>
+<pre>
+ InputConnection ic = getCurrentInputConnection();
+
+ ic.setComposingText("Composi", 1);
+...
-<p>See <code>android.text.InputType</code> for more details.</p>
-
-<p><code>EditorInfo.inputType</code> can contain other masked bits that
-indicate the class variation and other flags. For example,
-<code>TYPE_TEXT_VARIATION_PASSWORD</code> or <code>TYPE_TEXT_VARIATION_URI</code>
-or <code>TYPE_TEXT_FLAG_AUTO_COMPLETE</code>.</p>
-
-<h4>Password fields</h4>
-
-<p>Pay
-specific attention when sending text to password fields. Make sure that
-the password is not visible within your UI &mdash; neither in the input
-view or the candidates view. Also, do not save the password anywhere without
-explicitly informing the user.</p>
-
-<h3>Landscape vs. portrait</h3>
-
-<p>The UI needs to be able to scale between landscape and portrait orientations.
-In non-fullscreen IME mode, leave sufficient space for the application to show
-the text field and any associated context. Preferably, no more than half the
-screen should be occupied by the IME. In fullscreen IME mode this is not an
-issue.</p>
-
-<h3>Sending text to the application</h3>
-
-<p>There are two ways to send text to the application. You can either send
-individual key events or you can edit the text around the cursor in the
-application's text field.</p>
-
-<p>To send a key event, you can simply construct KeyEvent objects and call
-<code>InputConnection.sendKeyEvent()</code>. Here are some examples:</p>
-
-<pre>InputConnection ic = getCurrentInputConnection();
-long eventTime = SystemClock.uptimeMillis();
-ic.sendKeyEvent(new KeyEvent(eventTime, eventTime,
- KeyEvent.ACTION_DOWN, keyEventCode, 0, 0, 0, 0,
- KeyEvent.FLAG_SOFT_KEYBOARD|KeyEvent.FLAG_KEEP_TOUCH_MODE));
-ic.sendKeyEvent(new KeyEvent(SystemClock.uptimeMillis(), eventTime,
- KeyEvent.ACTION_UP, keyEventCode, 0, 0, 0, 0,
- KeyEvent.FLAG_SOFT_KEYBOARD|KeyEvent.FLAG_KEEP_TOUCH_MODE));</pre>
-
-<p>Or use the convenience method:</p>
-
-<pre>InputMethodService.sendDownUpKeyEvents(keyEventCode);</pre>
-
-<p class="note"><strong>Note</strong>:
-It is recommended to use the above method for certain fields such as
-phone number fields because of filters that may be applied to the text
-after each key press. Return key and delete key should also be sent as
-raw key events for certain input types, as applications may be watching
-for specific key events in order to perform an action.</p>
+ ic.setComposingText("Composin", 1);
-<p>When editing text in a text field, some of the more useful methods on
-<code>android.view.inputmethod.InputConnection</code> are:</p>
+...
+ ic.commitText("Composing ", 1);
+</pre>
+<p>
+ The following screenshots show how this appears to the user:
+</p>
+<img src="{@docRoot}resources/articles/images/inputmethod_composing_text_1.png" alt="" height="54"
+ id="figure3a" />
+<img src="{@docRoot}resources/articles/images/inputmethod_composing_text_2.png" alt="" height="53"
+ id="figure3b" />
+<img src="{@docRoot}resources/articles/images/inputmethod_composing_text_3.png" alt="" height="31"
+ id="figure3c" />
+<p class="img-caption">
+ <strong>Figure 3.</strong> Composing text before committing.
+</p>
+<h3 id="HardwareKeyEvents">Intercepting hardware key events</h3>
+<p>
+ Even though the input method window doesn't have explicit focus, it receives hardware key
+ events first and can choose to consume them or forward them along to the application. For
+ example, you may want to consume the directional keys to navigate within your UI for candidate
+ selection during composition. You may also want to trap the back key to dismiss any popups
+ originating from the input method window.</p>
+<p>
+ To intercept hardware keys, override
+ {@link android.inputmethodservice.InputMethodService#onKeyDown(int, KeyEvent) onKeyDown()}
+ and {@link android.inputmethodservice.InputMethodService#onKeyUp(int, KeyEvent) onKeyUp()}.
+ See the <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample
+ app for an example.
+</p>
+<p>
+ Remember to call the <code>super()</code> method for keys you don't want to handle yourself.
+</p>
+<h2 id="IMESubTypes">Creating an IME Subtype</h2>
+<p>
+ Subtypes allow the IME to expose multiple input modes and languages supported by an IME. A
+ subtype can represent:
+</p>
<ul>
-<li><code>getTextBeforeCursor()</code></li>
-<li><code>getTextAfterCursor()</code></li>
-<li><code>deleteSurroundingText()</code></li>
-<li><code>commitText()</code></li>
+ <li>A locale such as en_US or fr_FR</li>
+ <li>An input mode such as voice, keyboard, or handwriting</li>
+ <li>
+ Other input styles, forms, or properties specific to the IME, such as 10-key or qwerty
+ keyboard layouts.
+ </li>
</ul>
-
-<p>For example, let's say the text "Fell" is to the left of the cursor
-and you want to replace it with "Hello!":</p>
-
-<pre>InputConnection ic = getCurrentInputConnection();
-ic.deleteSurroundingText(4, 0);
-ic.commitText("Hello", 1);
-ic.commitText("!", 1);</pre>
-
-<h4>Composing text before committing</h4>
-
-<p>If your input method does some kind of text prediction or requires multiple
-steps to compose a word or glyph, you can show the progress in the text field
-until the user commits the word and then you can replace the partial composition
-with the completed text. The text that is being composed will be highlighted in
-the text field in some fashion, such as an underline.</p>
-
-<pre>InputConnection ic = getCurrentInputConnection();
-ic.setComposingText("Composi", 1);
-...
-ic.setComposingText("Composin", 1);
-...
-ic.commitText("Composing ", 1);</pre>
-
-<p><img style="width: 320px; height: 98px; margin-bottom: 10px;" src="images/ime_006.png">
-<img style="width: 320px; height: 97px; margin-bottom: 10px;" src="images/ime_005.png">
-<img style="width: 320px; height: 97px;" src="images/ime_004.png"></p>
-
-<h3>Intercepting hard key events</h3>
-
-<p>Even though the input method window doesn't have explicit focus, it receives
-hard key events first and can choose to consume them or forward them along to
-the application. For instance, you may want to consume the directional keys to
-navigate within your UI for candidate selection during composition. Or you may
-want to trap the back key to dismiss any popups originating from the input
-method window. To intercept hard keys, override
-<code>InputMethodService.onKeyDown()</code> and
-<code>InputMethodService.onKeyUp().</code> Remember to call
-<code>super.onKey</code>* if you don't want to consume a certain key
-yourself.</p>
-
-<h3>Other considerations</h3>
-
+<p>
+ Basically, the mode can be any text such as "keyboard", "voice", and so forth.
+</p>
+<p>A subtype can also expose a combination of these.</p>
+<p>
+ Subtype information is used for an IME switcher dialog that's available from the notification
+ bar and also for IME settings. The information also allows the framework to bring up a
+ specific subtype of an IME directly. When you build an IME, use the subtype facility, because
+ it helps the user identify and switch between different IME languages and modes.
+</p>
+<p>
+ You define subtypes in one of the input method's XML resource files, using the
+ <code>&lt;subtype&gt;</code> element. The following snippet defines an IME with two
+ subtypes: a keyboard subtype for the US English locale, and another keyboard subtype for the
+ French language locale for France:
+</p>
+<pre>
+&lt;input-method xmlns:android="http://schemas.android.com/apk/res/android"
+ android:settingsActivity="com.example.softkeyboard.Settings"
+ android:icon="&#64;drawable/ime_icon"
+ &lt;subtype android:name="&#64;string/display_name_english_keyboard_ime"
+ android:icon="&#64;drawable/subtype_icon_english_keyboard_ime"
+ android:imeSubtypeLanguage="en_US"
+ android:imeSubtypeMode="keyboard"
+ android:imeSubtypeExtraValue="somePrivateOption=true"
+ /&gt;
+ &lt;subtype android:name="&#64;string/display_name_french_keyboard_ime"
+ android:icon="&#64;drawable/subtype_icon_french_keyboard_ime"
+ android:imeSubtypeLanguage="fr_FR"
+ android:imeSubtypeMode="keyboard"
+ android:imeSubtypeExtraValue="foobar=30,someInternalOption=false"
+ /&gt;
+ &lt;subtype android:name="&#64;string/display_name_german_keyboard_ime"
+ ...
+ /&gt;
+/&gt;
+</pre>
+<p>
+ To ensure that your subtypes are labeled correctly in the UI, use %s to get a subtype label
+ that is the same as the subtype’s locale label. This is demonstrated in the next two snippets.
+ The first snippet shows part of the input method's XML file:
+</p>
+<pre>
+ &lt;subtype
+ android:label="&#64;string/label_subtype_generic"
+ android:imeSubtypeLocale="en_US"
+ android:icon="&#64;drawable/icon_en_us"
+ android:imeSubtypeMode="keyboard" /&gt;
+</pre>
+<p>
+ The next snippet is part of the IME's <code>strings.xml</code> file. The string
+ resource <code>label_subtype_generic</code>, which is used by the input method UI definition to
+ set the subtype's label, is defined as:
+</p>
+<pre>
+&lt;string name="label_subtype_generic"&gt;%s&lt;/string&gt;
+</pre>
+<p>
+ This sets the subtype’s display name to “English (United States)” in any English language
+ locale, or to the appropriate localization in other locales.
+</p>
+<h3 id="SubtypeProcessing">Choosing IME subtypes from the notification bar</h3>
+<p>
+ The Android system manages all subtypes exposed by all IMEs. IME subtypes are
+ treated as modes of the IME they belong to. In the notification bar, a user can select an
+ available subtype for the currently-set IME, as shown in the following screenshot:
+</p>
+<img src="{@docRoot}resources/articles/images/inputmethod_subtype_notification.png" alt=""
+ height="85" id="figure4" />
+<p class="img-caption">
+ <strong>Figure 4.</strong> Choosing an IME subtype from the notification bar.
+</p>
+<img src="{@docRoot}resources/articles/images/inputmethod_subtype_preferences.png" alt=""
+ height="165" id="figure5" />
+<p class="img-caption">
+ <strong>Figure 5.</strong> Setting subtype preferences in System Settings.
+</p>
+<h3 id="SubtypeSettings">Choosing IME subtypes from System Settings</h3>
+<p>
+ A user can control how subtypes are used in the “Language &amp; input” settings panel in the
+ System Settings area. In the Soft Keyboard sample, the file
+ <code>InputMethodSettingsFragment.java</code> contains an implementation that
+ facilitates a subtype enabler in the IME settings. Please refer to the SoftKeyboard sample in
+ the Android SDK for more information about how to support Input Method Subtypes in your IME.
+</p>
+<img src="{@docRoot}resources/articles/images/inputmethod_subtype_settings.png" alt=""
+ height="210" id="figure6" />
+<p class="img-caption">
+ <strong>Figure 6.</strong> Choosing a language for the IME.
+</p>
+<h2 id="GeneralDesign">General IME Considerations</h2>
+<p>
+ Here are some other things to consider as you're implementing your IME:
+</p>
<ul>
-<li>Provide a way for the user to easily bring up any associated settings
-directly from the input method UI</li>
-<li>Provide
-a way for the user to switch to a different input method (multiple
-input methods may be installed) directly from the input method UI.</li>
-<li>Bring
-up the UI quickly - preload or lazy-load any large resources so that
-the user sees the input method quickly on tapping on a text field. And
-cache any resources and views for subsequent invocations of the input
-method.</li>
-<li>On the flip side, any large memory allocations should
-be released soon after the input method window is hidden so that
-applications can have sufficient memory to run. Consider using a
-delayed message to release resources if the input method is in a hidden
-state for a few seconds.</li>
-<li>Make sure that most common characters
-can be entered using the input method, as users may use punctuation in
-passwords or user names and they shouldn't be stuck in a situation
-where they can't enter a certain character in order to gain access into
-a password-locked device.</li>
+<li>
+ Provide a way for users to set options directly from the IME's UI.
+</li>
+<li>
+ Because multiple IMEs may be installed on the device, provide a way for the user to switch to a
+ different IME directly from the input method UI.
+</li>
+<li>
+ Bring up the IME's UI quickly. Preload or load on demand any large resources so that users
+ see the IME as soon as they tap on a text field. Cache resources and views for subsequent
+ invocations of the input method.
+</li>
+<li>
+ Conversely, you should release large memory allocations soon after the input method window is
+ hidden, so that applications can have sufficient memory to run. Consider using a delayed message
+ to release resources if the IME is in a hidden state for a few seconds.
+</li>
+<li>
+ Make sure that users can enter as many characters as possible for the language or locale
+ associated with the IME. Remember that users may use punctuation in passwords or user
+ names, so your IME has to provide many different characters to allow users to enter a
+ password and get access to the device.
+</li>
</ul>
-
-<h3>Samples</h3>
-
-<p>For a real world example, with support for multiple input types and text
-prediction, see the <a id="ccpb"
-href="http://android.git.kernel.org/?p=platform/packages/inputmethods/LatinIME.
-git;a=tree" title="LatinIME source code online">LatinIME source code</a>. The
-Android SDK also includes a SoftKeyboard sample as well.</p>
diff --git a/docs/html/resources/articles/images/inputmethod_composing_text_1.png b/docs/html/resources/articles/images/inputmethod_composing_text_1.png
new file mode 100644
index 0000000..3403489
--- /dev/null
+++ b/docs/html/resources/articles/images/inputmethod_composing_text_1.png
Binary files differ
diff --git a/docs/html/resources/articles/images/inputmethod_composing_text_2.png b/docs/html/resources/articles/images/inputmethod_composing_text_2.png
new file mode 100644
index 0000000..67bd1d9
--- /dev/null
+++ b/docs/html/resources/articles/images/inputmethod_composing_text_2.png
Binary files differ
diff --git a/docs/html/resources/articles/images/inputmethod_composing_text_3.png b/docs/html/resources/articles/images/inputmethod_composing_text_3.png
new file mode 100644
index 0000000..4fd1a30
--- /dev/null
+++ b/docs/html/resources/articles/images/inputmethod_composing_text_3.png
Binary files differ
diff --git a/docs/html/resources/articles/images/inputmethod_lifecycle_image.png b/docs/html/resources/articles/images/inputmethod_lifecycle_image.png
new file mode 100644
index 0000000..5f7cf95
--- /dev/null
+++ b/docs/html/resources/articles/images/inputmethod_lifecycle_image.png
Binary files differ
diff --git a/docs/html/resources/articles/images/inputmethod_numeric_type_screenshot.png b/docs/html/resources/articles/images/inputmethod_numeric_type_screenshot.png
new file mode 100644
index 0000000..61b7483
--- /dev/null
+++ b/docs/html/resources/articles/images/inputmethod_numeric_type_screenshot.png
Binary files differ
diff --git a/docs/html/resources/articles/images/inputmethod_subtype_notification.png b/docs/html/resources/articles/images/inputmethod_subtype_notification.png
new file mode 100644
index 0000000..3f13927
--- /dev/null
+++ b/docs/html/resources/articles/images/inputmethod_subtype_notification.png
Binary files differ
diff --git a/docs/html/resources/articles/images/inputmethod_subtype_preferences.png b/docs/html/resources/articles/images/inputmethod_subtype_preferences.png
new file mode 100644
index 0000000..d8aa0cf
--- /dev/null
+++ b/docs/html/resources/articles/images/inputmethod_subtype_preferences.png
Binary files differ
diff --git a/docs/html/resources/articles/images/inputmethod_subtype_settings.png b/docs/html/resources/articles/images/inputmethod_subtype_settings.png
new file mode 100644
index 0000000..b8942c6
--- /dev/null
+++ b/docs/html/resources/articles/images/inputmethod_subtype_settings.png
Binary files differ
diff --git a/docs/html/resources/articles/images/inputmethod_text_type_screenshot.png b/docs/html/resources/articles/images/inputmethod_text_type_screenshot.png
new file mode 100644
index 0000000..8008b27
--- /dev/null
+++ b/docs/html/resources/articles/images/inputmethod_text_type_screenshot.png
Binary files differ
diff --git a/docs/html/resources/resources_toc.cs b/docs/html/resources/resources_toc.cs
index e1a5e0f..303a6d4 100644
--- a/docs/html/resources/resources_toc.cs
+++ b/docs/html/resources/resources_toc.cs
@@ -97,6 +97,30 @@
</li>
</ul>
</li>
+
+ <li class="toggle-list">
+ <div><a href="<?cs var:toroot ?>training/efficient-downloads/index.html">
+ <span class="en">Transferring Data Without Draining the Battery</span>
+ </a> <span class="new">new!</span></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>training/efficient-downloads/efficient-network-access.html">
+ <span class="en">Optimizing Downloads for Efficient Network Access</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/efficient-downloads/regular_updates.html">
+ <span class="en">Minimizing the Effect of Regular Updates</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/efficient-downloads/redundant_redundant.html">
+ <span class="en">Redundant Downloads are Redundant</span>
+ </a>
+ </li>
+ <li><a href="<?cs var:toroot ?>training/efficient-downloads/connectivity_patterns.html">
+ <span class="en">Modifying Patterns Based on the Connectivity Type</span>
+ </a>
+ </li>
+ </ul>
+ </li>
<li class="toggle-list">
<div><a href="<?cs var:toroot ?>training/search/index.html">
diff --git a/docs/html/resources/samples/get.jd b/docs/html/resources/samples/get.jd
index 86ec836..751965f 100644
--- a/docs/html/resources/samples/get.jd
+++ b/docs/html/resources/samples/get.jd
@@ -26,15 +26,15 @@ needed!</p>
<p>The SDK sample code is available to you as a set of downloadable SDK
components, each of which contains the samples for a specific Android platform
version. Once you have installed the SDK, you can download one or more samples
-component(s) into your SDK environment using the Android SDK and AVD Manager
+component(s) into your SDK environment using the Android SDK Manager
tool, which is pre-installed in the SDK. </p>
-<p>To download the samples, launch the Android SDK and AVD Manager tool and
+<p>To download the samples, launch the Android SDK Manager tool and
select one of the samples components from the <strong>Available
Packages</strong> panel, for example "Samples for SDK API 7". Select
<strong>Install Selected</strong>, verify and accept the download, then select
<strong>Install Accepted</strong> to download the component into your SDK. If
-you aren't familiar with the Android SDK and AVD Manager and how to launch or
+you aren't familiar with the Android SDK Manager and how to launch or
use it, please read the <a href="{@docRoot}sdk/adding-components.html">Adding
SDK Components</a> document. </p>
@@ -74,7 +74,7 @@ From there you can read a short summary of each sample application and what
types of concepts, features, or APIs it includes. Then, use the links provided
to move through the directories and files of each sample. The browseable source
is generated from the same source code that is downloadable through the Android
-SDK and AVD Manager, as described above. </p>
+SDK Manager, as described above. </p>
<p>The browseable samples files are available online, at the Android Developers
site only and are not included in the downloadable offline documentation.
diff --git a/docs/html/resources/tutorials/hello-world.jd b/docs/html/resources/tutorials/hello-world.jd
index cc8cb3e..70ba06c 100644
--- a/docs/html/resources/tutorials/hello-world.jd
+++ b/docs/html/resources/tutorials/hello-world.jd
@@ -42,7 +42,7 @@ you need to do it now.</p>
<ol>
- <li>In the Android SDK and AVD Manager, choose <strong>Available
+ <li>In the Android SDK Manager, choose <strong>Available
Packages</strong> in the left panel.</li>
<li>In the right panel, expand the Android Repository list to display
@@ -72,7 +72,7 @@ device settings used by the emulator.</p>
<p>To create an AVD:</p>
<ol>
- <li>In Eclipse, select <strong>Window &gt; Android SDK and AVD Manager</strong>.</li>
+ <li>In Eclipse, select <strong>Window &gt; AVD Manager</strong>.</li>
<li>Select <strong>Virtual Devices</strong> in the left panel.</li>
<li>Click <strong>New...</strong>.
diff --git a/docs/html/resources/tutorials/testing/activity_test.jd b/docs/html/resources/tutorials/testing/activity_test.jd
index 4b861e2..f88b768 100644
--- a/docs/html/resources/tutorials/testing/activity_test.jd
+++ b/docs/html/resources/tutorials/testing/activity_test.jd
@@ -163,7 +163,7 @@ parent.link=../../browser.html?tag=tutorial
open the Android SDK and AVD Manager and check in the
<strong>Installed Packages</strong> panel.
If aren't sure how to download a platform into your SDK,
- read <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.
+ read <a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.
</p>
</li>
</ul>
diff --git a/docs/html/sdk/adding-components.jd b/docs/html/sdk/adding-components.jd
index ca27bba..599b2a8 100644
--- a/docs/html/sdk/adding-components.jd
+++ b/docs/html/sdk/adding-components.jd
@@ -1,4 +1,4 @@
-page.title=Adding SDK Components
+page.title=Adding SDK Packages
@jd:body
@@ -6,74 +6,74 @@ page.title=Adding SDK Components
<div id="qv">
<h2>Quickview</h2>
<ul>
- <li>Use the Android SDK and AVD Manager to
+ <li>Use the Android SDK Manager to
set up your SDK and keep it up-to-date.</li>
</ul>
<h2>In this document</h2>
<ol>
- <li><a href="#launching">Launching the Android SDK and AVD Manager</a>
- <li><a href="#InstallingComponents">Installing SDK Components</a>
- <li><a href="#UpdatingComponents">Updating SDK Components</a>
- <li><a href="#dependencies">Component Dependencies</a></li>
+ <li><a href="#launching">Launching the Android SDK Manager</a>
+ <li><a href="#InstallingComponents">Installing SDK Packages</a>
+ <li><a href="#UpdatingComponents">Updating SDK Packages</a>
+ <li><a href="#dependencies">Package Dependencies</a></li>
<li><a href="#AddingSites">Adding New Sites</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
</ol>
</div>
</div>
-<p>Adding and updating components in your Android SDK is fast and easy. To add or
-update the individual SDK components that you need, use the <em>Android SDK and AVD
+<p>Adding and updating packages in your Android SDK is fast and easy. To add or
+update the individual SDK packages that you need, use the <em>Android SDK
Manager</em> (included in the SDK Tools).</p>
<p>It only takes a couple of clicks to install individual versions of the
Android platform, new development tools, new documentation, and SDK add-ons. The
-new SDK components are automatically installed into your existing SDK directory,
+new SDK packages are automatically installed into your existing SDK directory,
so you don't need to update your development environment to specify a new SDK
location.</p>
<p>If you're setting up your Android SDK for the first time,
see <a href="{@docRoot}sdk/installing.html#components">Installing the SDK</a> for information about
-what components to install.</p>
+what packages to install.</p>
<p class="note"><strong>Note:</strong> If you develop in Eclipse, you might also need
to update your ADT plugin when you update your development tools. See the revisions listed in the
<a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a> document.</p>
<img src="{@docRoot}images/sdk_manager_packages.png" alt="" />
-<p class="img-caption"><strong>Figure 1.</strong> The Android SDK and AVD Manager's
-<strong>Available Packages</strong> panel, which shows the SDK components that are
+<p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager's
+<strong>Available Packages</strong> panel, which shows the SDK packages that are
available for you to download into your environment. </p>
</div>
-<h2 id="launching">Launching the Android SDK and AVD Manager</h2>
+<h2 id="launching">Launching the Android SDK Manager</h2>
-<p>The Android SDK and AVD Manager is the tool that you use to install and
-upgrade SDK components in your development environment. </p>
+<p>The Android SDK Manager is the tool that you use to install and
+upgrade SDK packages in your development environment. </p>
-<p>You can launch the Android SDK and AVD Manager in one of the following ways.</p>
+<p>You can launch the Android SDK Manager in one of the following ways.</p>
<h4>Launching from Eclipse/ADT</h4>
<p>If you are developing in Eclipse and have already installed the ADT Plugin,
-follow these steps to access the Android SDK and AVD Manager tool:</p>
+follow these steps to access the Android SDK Manager tool:</p>
<ol>
<li>Open Eclipse</li>
-<li>Select <strong>Window</strong> &gt; <strong>Android SDK and AVD
+<li>Select <strong>Window</strong> &gt; <strong>Android SDK
Manager</strong>.</li>
</ol>
<h4>Launching from the SDK Manager script (Windows only)</h4>
-<p>For Windows only, the SDK includes a script that invokes the Android SDK and
-AVD Manager. To launch the tool using the script, double-click {@code SDK
+<p>For Windows only, the SDK includes a script that invokes the Android SDK Manager. To launch the
+tool using the script, double-click {@code SDK
Manager.exe} at the root of the the SDK directory.</p>
<h4>Launching from a command line</h4>
-<p>In all development environments, follow these steps to access the Android SDK
-and AVD Manager tool from the command line: </p>
+<p>In all development environments, follow these steps to access the Android SDK Manager tool from
+the command line: </p>
<ol>
<li>Navigate to the <code>&lt;<em>sdk</em>&gt;/tools/</code> directory.</li>
@@ -82,26 +82,26 @@ and AVD Manager tool from the command line: </p>
</ol>
-<h2 id="InstallingComponents">Installing SDK Components</h2>
+<h2 id="InstallingComponents">Installing SDK Packages</h2>
-<p class="caution"><strong>Caution:</strong> Before you install SDK components,
+<p class="caution"><strong>Caution:</strong> Before you install SDK packages,
we recommend that you disable any antivirus software that may be running on
your computer. There are cases in which antivirus software on Windows is known to interfere with the
installation process, so we suggest you disable your antivirus until installation is
complete.</p>
-<p>Follow these steps to install new SDK components in your environment:</p>
+<p>Follow these steps to install new SDK packages in your environment:</p>
<ol>
- <li>Launch the Android SDK and AVD Manager as described in the section above.</li>
+ <li>Launch the Android SDK Manager as described in the section above.</li>
<li>Select <strong>Available Packages</strong> in the left panel.
- This will reveal all of the components that are currently available for download
+ This will reveal all of the packages that are currently available for download
from the SDK repository.</li>
- <li>Select the component(s) you'd like to install and click <strong>Install
+ <li>Select the package(s) you'd like to install and click <strong>Install
Selected</strong>. (If you aren't sure which packages to select, read <a
- href="installing.html#which">Recommended Components</a>.)</li>
- <li>Verify and accept the components you want (ensure each one is selected with a green
-checkmark) and click <strong>Install</strong>. The components will now be installed into
+ href="installing.html#which">Recommended Packages</a>.)</li>
+ <li>Verify and accept the packages you want (ensure each one is selected with a green
+checkmark) and click <strong>Install</strong>. The packages will now be installed into
your existing Android SDK directories.</li>
</ol>
@@ -114,60 +114,60 @@ and new documentation is saved in the existing
<code>&lt;sdk&gt;/docs/</code> directory (old docs are replaced).</p>
-<h2 id="UpdatingComponents">Updating SDK Components</h2>
+<h2 id="UpdatingComponents">Updating SDK Packages</h2>
-<p>From time to time, new revisions of existing SDK components are released and
+<p>From time to time, new revisions of existing SDK packages are released and
made available to you through the SDK repository. In most cases, if you have those
-components installed in your environment, you will want
+packages installed in your environment, you will want
to download the new revisions as soon as possible. </p>
<p>You can learn about the release of new revisions in two ways: </p>
<ul>
<li>You can watch for updates listed in the "SDK" tab of the Android Developers
-site, in the "Downloadable SDK Components" section. </li>
+site, in the "Downloadable SDK Packages" section. </li>
<li>You can watch for updates listed in the <strong>Available Packages</strong>
-panel of the Android SDK and AVD Manager. </li>
+panel of the Android SDK Manager. </li>
</ul>
-<p>When you see that a new revision is available, you can use the Android SDK
-and AVD Manager to quickly download it to your environment. Follow the same
-procedure as given in <a href="#InstallingComponents">Installing SDK Components</a>, above. The new
-component is installed in place of the old, but without impacting your
+<p>When you see that a new revision is available, you can use the Android SDK Manager to quickly
+download it to your environment. Follow the same
+procedure as given in <a href="#InstallingComponents">Installing SDK Packages</a>, above. The new
+package is installed in place of the old, but without impacting your
applications. </p>
<p class="note"><strong>Tip:</strong>
-Use the "Display updates only" checkbox to show only the components
+Use the "Display updates only" checkbox to show only the packages
you do not have.</p>
-<h2 id="dependencies">SDK Component Dependencies</h2>
+<h2 id="dependencies">SDK Package Dependencies</h2>
-<p>In some cases, an SDK component may require a specific minimum revision of
-another component or SDK tool. Where such dependencies exist, they are
-documented in the revision notes for each component, available from the links in
-the "Downloadable SDK Components" section at left.</p>
+<p>In some cases, an SDK package may require a specific minimum revision of
+another package or SDK tool. Where such dependencies exist, they are
+documented in the revision notes for each package, available from the links in
+the "Downloadable SDK packages" section at left.</p>
<p>For example, there may be a dependency between the ADT Plugin for Eclipse and
-the SDK Tools component. When you install the SDK Tools
-component, you should also upgrade to the required version of ADT (if you
+the SDK Tools package. When you install the SDK Tools
+package, you should also upgrade to the required version of ADT (if you
are developing in Eclipse). In this case, the major version number for your ADT plugin should
always match the revision number of your SDK Tools (for example, ADT 8.x requires SDK Tools r8).
</p>
<p>Also make sure that, each time you install a new version of the Android platform, you have
-the latest version of the SDK Platform-tools component. The SDK Platform-tools contain
+the latest version of the SDK Platform-tools package. The SDK Platform-tools contain
tools that are backward compatible with all versions of the Android platform and are
often updated to support new features in the latest version of the Android platform.</p>
<p>The development tools will notify you with debug warnings if there is dependency that you need to
-address. The SDK and AVD Manager also enforces dependencies by requiring that you download any
-components that are needed by those you have selected.</p>
+address. The Android SDK Manager also enforces dependencies by requiring that you download any
+packages that are needed by those you have selected.</p>
<h2 id="AddingSites">Adding New Sites</h2>
-<p>By default, <strong>Available Packages</strong> displays components available from the
+<p>By default, <strong>Available Packages</strong> displays packages available from the
<em>Android Repository</em> and <em>Third party Add-ons</em>. You can add other sites that host
their own Android SDK add-ons, then download the SDK add-ons
from those sites.</p>
@@ -178,7 +178,7 @@ to develop using their libraries, you must install their Android SDK add-on, if
available under <em>Third party Add-ons</em>. </p>
<p>If a carrier or device manufacturer has hosted an SDK add-on repository file
-on their web site, follow these steps to add their site to the SDK and AVD
+on their web site, follow these steps to add their site to the Android SDK
Manager:</p>
<ol>
@@ -186,7 +186,7 @@ Manager:</p>
<li>Click <strong>Add Add-on Site</strong> and enter the URL of the
{@code repository.xml} file. Click <strong>OK</strong>.</li>
</ol>
-<p>Any SDK components available from the site will now be listed under a new item named
+<p>Any SDK packages available from the site will now be listed under a new item named
<strong>User Add-ons</strong>.</p>
@@ -194,12 +194,12 @@ Manager:</p>
<p><strong>Problems connecting to the SDK repository</strong></p>
-<p>If you are using the SDK and AVD Manager to download components and are encountering
+<p>If you are using the Android SDK Manager to download packages and are encountering
connection problems, try connecting over http, rather than https. To switch the
-protocol used by the SDK and AVD Manager, follow these steps: </p>
+protocol used by the Android SDK Manager, follow these steps: </p>
<ol>
- <li>With the Android SDK and AVD Manager window open, select "Settings" in the
+ <li>With the Android SDK Manager window open, select "Settings" in the
left pane. </li>
<li>On the right, in the "Misc" section, check the checkbox labeled "Force
https://... sources to be fetched using http://..." </li>
diff --git a/docs/html/sdk/android-3.0.jd b/docs/html/sdk/android-3.0.jd
index 39a234f..3acb358 100644
--- a/docs/html/sdk/android-3.0.jd
+++ b/docs/html/sdk/android-3.0.jd
@@ -25,7 +25,8 @@ Differences Report &raquo;</a> </li>
<h2>See Also</h2>
<ol>
- <li><a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing Apps for Android 3.0</a></li>
+ <li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">Supporting Tablets and
+Handsets</a></li>
</ol>
</div>
@@ -41,7 +42,7 @@ libraries.</p>
<p>To get started developing or testing against Android {@sdkPlatformVersion}, use the Android SDK
Manager to download the platform into your SDK. For more information, see <a
-href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>. If you are new to Android, <a
+href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>. If you are new to Android, <a
href="{@docRoot}sdk/index.html">download the SDK Starter Package</a> first.</p>
<p>For a high-level introduction to Android {@sdkPlatformVersion}, see the <a
@@ -52,8 +53,8 @@ Highlights</a>.</p>
If you've already published an Android application, please test and optimize your application on
Android 3.0 as soon as possible. You should do so to be sure your application provides the best
experience possible on the latest Android-powered devices. For information about what you can do,
-read <a href="{@docRoot}guide/practices/optimizing-for-3.0.html">Optimizing Apps for Android
-3.0</a>.</p>
+read <a href="{@docRoot}guide/practices/tablets-and-handsets.html">Supporting Tablets and
+Handsets</a>.</p>
<h2 id="relnotes">Revisions</h2>
diff --git a/docs/html/sdk/compatibility-library.jd b/docs/html/sdk/compatibility-library.jd
index 30d807f..f81e8ae 100644
--- a/docs/html/sdk/compatibility-library.jd
+++ b/docs/html/sdk/compatibility-library.jd
@@ -330,13 +330,13 @@ Android 3.2 and higher (all other APIs in the v4 library are already available w
<h2 id="Downloading">Downloading the Support Package</h2>
-<p>The Support Package is provided as a downloadable package from the Android SDK and AVD
+<p>The Support Package is provided as a downloadable package from the Android SDK
Manager. To install:</p>
<ol>
- <li>Launch the SDK and AVD Manager.
+ <li>Launch the Android SDK Manager.
<p>From Eclipse, you can select <strong>Window</strong>
-&gt; <strong>Android SDK and AVD Manager</strong>. Or, launch {@code SDK Manager.exe} from
+&gt; <strong>Android SDK Manager</strong>. Or, launch {@code SDK Manager.exe} from
the {@code &lt;sdk&gt;/} directory (on Windows only) or {@code android} from the {@code
&lt;sdk&gt;/tools/} directory.</p></li>
<li>Expand the Android Repository, check <strong>Android Support package</strong>
diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd
index 3019544..485f01e 100644
--- a/docs/html/sdk/eclipse-adt.jd
+++ b/docs/html/sdk/eclipse-adt.jd
@@ -36,7 +36,7 @@ that is designed to give you a powerful, integrated environment in which
to build Android applications.</p>
<p>ADT extends the capabilities of Eclipse to let you quickly set up new Android
-projects, create an application UI, add components based on the Android
+projects, create an application UI, add packages based on the Android
Framework API, debug your applications using the Android SDK tools, and even
export signed (or unsigned) {@code .apk} files in order to distribute your application.</p>
@@ -468,7 +468,7 @@ ADT 12.0.0</a> <em>(July 2011)</em>
<dd>ADT 12.0.0 is designed for use with <a href="{@docRoot}sdk/tools-notes.html">SDK Tools r12</a>. If you haven't
already installed SDK Tools r12 into your SDK, use
-the Android SDK and AVD Manager to do so.</dd>
+the Android SDK Manager to do so.</dd>
<dt>Visual Layout Editor:</dt>
<dd>
@@ -520,7 +520,7 @@ ADT 11.0.0</a> <em>(June 2011)</em>
<dt>Dependencies:</dt>
<dd>ADT 11.0.0 is designed for use with SDK Tools r11. If you haven't
-already installed SDK Tools r11 into your SDK, use the Android SDK and AVD Manager to do
+already installed SDK Tools r11 into your SDK, use the Android SDK Manager to do
so.</dd>
<dt>Visual Refactoring:</dt>
@@ -656,7 +656,7 @@ ADT 10.0.1</a> <em>(March 2011)</em>
<dt>Dependencies:</dt>
<dd>ADT 10.0.1 is designed for use with SDK Tools r10. If you haven't
-already installed SDK Tools r10 into your SDK, use the Android SDK and AVD Manager to do
+already installed SDK Tools r10 into your SDK, use the Android SDK Manager to do
so.</dd>
<dt>General notes:</dt>
@@ -686,7 +686,7 @@ ADT 10.0.0</a> <em>(February 2011)</em>
<dt>Dependencies:</dt>
<dd>ADT 10.0.0 is designed for use with SDK Tools r10. If you haven't
-already installed SDK Tools r10 into your SDK, use the Android SDK and AVD Manager to do
+already installed SDK Tools r10 into your SDK, use the Android SDK Manager to do
so.</dd>
<dt>General notes:</dt>
@@ -736,7 +736,7 @@ ADT 9.0.0</a> <em>(January 2011)</em>
<dt>Dependencies:</dt>
<dd>ADT 9.0.0 is designed for use with SDK Tools r9. If you haven't
-already installed SDK Tools r9 into your SDK, use the Android SDK and AVD Manager to do
+already installed SDK Tools r9 into your SDK, use the Android SDK Manager to do
so.</dd>
<dt>General notes:</dt>
@@ -845,7 +845,7 @@ ADT 8.0.1</a> <em>(December 2010)</em>
<dt>Dependencies:</dt>
<p><p>ADT 8.0.1 is designed for use with SDK Tools r8. If you haven't
-already installed SDK Tools r8 into your SDK, use the Android SDK and AVD Manager to do
+already installed SDK Tools r8 into your SDK, use the Android SDK Manager to do
so.</p></dd>
<dt>General notes:</dt>
@@ -874,7 +874,7 @@ ADT 8.0.0</a> <em>(December 2010)</em>
<dt>Dependencies:</dt>
<p><p>ADT 8.0.0 is designed for use with SDK Tools r8. If you haven't
-already installed SDK Tools r8 into your SDK, use the Android SDK and AVD Manager to do
+already installed SDK Tools r8 into your SDK, use the Android SDK Manager to do
so.</p></dd>
<dt>General notes:</dt>
@@ -1020,8 +1020,8 @@ ADT 0.9.6</a> <em>(March 2010)</em>
<dt>Dependencies:</dt>
<dd><p>ADT 0.9.6 is designed for use with SDK Tools r5 and later. Before
-updating to ADT 0.9.6, we highly recommend that you use the Android SDK and
-AVD Manager to install SDK Tools r5 into your SDK.</p></dd>
+updating to ADT 0.9.6, we highly recommend that you use the Android SDK Manager to install SDK
+Tools r5 into your SDK.</p></dd>
<dt>General Notes:</dt>
<dd>
@@ -1038,8 +1038,8 @@ first time with the SDK Usage panel.</li>
<dt>AVD/SDK Manager:</dt>
<dd>
<ul>
-<li>Adds support for platform samples components.</li>
-<li>Improves support for dependency between components.</li>
+<li>Adds support for platform samples packages.</li>
+<li>Improves support for dependency between packages.</li>
<li>AVDs now sorted by API level.</li>
<li>The AVD creation dialog now enforces a minimum SD card size of 9MB.</li>
<li>Prevents deletion of running AVDs.</li>
@@ -1087,9 +1087,9 @@ ADT 0.9.5</a> <em>(December 2009)</em>
<dt>Dependencies:</dt>
<dd><p>ADT 0.9.5 requires features provided in SDK Tools r4 or higher. If you install
-ADT 0.9.5, which is highly recommended, you should use the Android SDK and AVD
+ADT 0.9.5, which is highly recommended, you should use the Android SDK
Manager to download the latest SDK Tools into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</p>
+see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.</p>
</dd>
<dt>General notes:</dt>
@@ -1114,9 +1114,9 @@ ADT 0.9.4</a> <em>(October 2009)</em>
<dt>Dependencies:</dt>
<dd><p>ADT 0.9.4 requires features provided in SDK Tools r3 or higher. If you install
-ADT 0.9.4, which is highly recommended, you should use the Android SDK and AVD
+ADT 0.9.4, which is highly recommended, you should use the Android SDK
Manager to download the latest SDK Tools into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</p>
+see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.</p>
</dd>
<dt>Project Creation Wizard:</dt>
@@ -1318,9 +1318,9 @@ to follow these steps again instead of the default update instructions.</p>
<h4>Other install errors</h4>
<p>Note that there are features of ADT that require some optional
-Eclipse components (for example, WST). If you encounter an error when
-installing ADT, your Eclipse installion might not include these components.
-For information about how to quickly add the necessary components to your
+Eclipse packages (for example, WST). If you encounter an error when
+installing ADT, your Eclipse installion might not include these packages.
+For information about how to quickly add the necessary packages to your
Eclipse installation, see the troubleshooting topic
<a href="{@docRoot}resources/faq/troubleshooting.html#installeclipsecomponents">ADT
Installation Error: "requires plug-in org.eclipse.wst.sse.ui"</a>.</p>
@@ -1345,9 +1345,9 @@ you should update to it as soon as convenient. </p>
<p>In some cases, a new revision of ADT will have a dependency on a specific
revision of the Android SDK Tools. If such dependencies exist, you will need to
-update the SDK Tools component of the SDK after installing the new revision of
-ADT. To update the SDK Tools component, use the Android SDK and AVD Manager, as
-described in <a href="adding-components.html">Adding SDK Components</a>.</p>
+update the SDK Tools package of the SDK after installing the new revision of
+ADT. To update the SDK Tools package, use the Android SDK Manager, as
+described in <a href="adding-components.html">Adding SDK Packages</a>.</p>
<p>To learn about new features of each ADT revision and also any dependencies on
the SDK Tools, see the listings in the <a href="#notes">Revisions</a>
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index c09b3c2..175ab50 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -28,7 +28,7 @@ sdk.linux_checksum=14e99dfa8eb1a8fadd2f3557322245c4
<li>Install the SDK starter package from the table above. (If you're on Windows, download the
installer for help with the initial setup.)</li>
<li>Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse).</li>
- <li>Add Android platforms and other components to your SDK.</li>
+ <li>Add Android platforms and other packages to your SDK.</li>
<li>Explore the contents of the Android SDK (optional).</li>
</ol>
diff --git a/docs/html/sdk/installing.jd b/docs/html/sdk/installing.jd
index 1dce483..7461eb0 100644
--- a/docs/html/sdk/installing.jd
+++ b/docs/html/sdk/installing.jd
@@ -53,10 +53,10 @@ function toggleDiv(link) {
<li><a href="#Preparing">1. Preparing Your Development Computer</a></li>
<li><a href="#Installing">2. Downloading the SDK Starter Package</a></li>
<li><a href="#InstallingADT">3. Installing the ADT Plugin for Eclipse</a></li>
- <li><a href="#AddingComponents">4. Adding Platforms and Other Components</a>
+ <li><a href="#AddingComponents">4. Adding Platforms and Other Packages</a>
<ol>
- <li><a href="#components">Available Components</a></li>
- <li><a href="#which">Recommended Components</a></li>
+ <li><a href="#components">Available Packages</a></li>
+ <li><a href="#which">Recommended Packages</a></li>
</ol></li>
<li><a href="#sdkContents">5. Exploring the SDK (Optional)</a></li>
<li><a href="#NextSteps">Next Steps</a></li>
@@ -66,7 +66,7 @@ function toggleDiv(link) {
<h2>See also</h2>
<ol>
<li><a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a></li>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
+ <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a></li>
</ol>
</div>
@@ -81,9 +81,9 @@ this page.</p>
<h4>Updating?</h4>
-<p>If you already have an Android SDK, use the Android SDK and AVD Manager tool to install
+<p>If you already have an Android SDK, use the Android SDK Manager tool to install
updated tools and new Android platforms into your existing environment. For information about how to
-do that, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</p>
+do that, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a>.</p>
<h2 id="Preparing">Step 1. Preparing Your Development Computer</h2>
@@ -111,7 +111,7 @@ RCP version of Eclipse is recommended.</p>
<p>The SDK starter package is not a full
development environment&mdash;it includes only the core SDK Tools, which you can
-use to download the rest of the SDK components (such as the latest Android platform).</p>
+use to download the rest of the SDK packages (such as the latest Android platform).</p>
<p>If you haven't already, get the latest version of the SDK starter package from the <a
href="{@docRoot}sdk/index.html">SDK download page</a>.</p>
@@ -154,53 +154,53 @@ developing in Eclipse or other IDEs.</p>
-<h2 id="AddingComponents">Step 4. Adding Platforms and Other Components</h2>
+<h2 id="AddingComponents">Step 4. Adding Platforms and Other Packages</h2>
-<p>The last step in setting up your SDK is using the Android SDK and AVD Manager (a
-tool included in the SDK starter package) to download essential SDK components into your development
+<p>The last step in setting up your SDK is using the Android SDK Manager (a
+tool included in the SDK starter package) to download essential SDK packages into your development
environment.</p>
<p>The SDK uses a modular structure that separates the major parts of the SDK&mdash;Android platform
versions, add-ons, tools, samples, and documentation&mdash;into a set of separately installable
-components. The SDK starter package, which you've already downloaded, includes only a single
-component: the latest version of the SDK Tools. To develop an Android application, you also need to
+packages. The SDK starter package, which you've already downloaded, includes only a single
+package: the latest version of the SDK Tools. To develop an Android application, you also need to
download at least one Android platform and the associated platform tools. You can add other
-components and platforms as well, which is highly recommended.</p>
+packages and platforms as well, which is highly recommended.</p>
<p>If you used the Windows installer, when you complete the installation wizard, it will launch the
-Android SDK and AVD Manager with a default set of platforms and other components selected
+Android SDK Manager with a default set of platforms and other packages selected
for you to install. Simply click <strong>Install</strong> to accept the recommended set of
-components and install them. You can then skip to <a href="#sdkContents">Step 5</a>, but we
-recommend you first read the section about the <a href="#components">Available Components</a> to
-better understand the components available from the Android SDK and AVD Manager.</p>
+packages and install them. You can then skip to <a href="#sdkContents">Step 5</a>, but we
+recommend you first read the section about the <a href="#components">Available Packages</a> to
+better understand the packages available from the Android SDK Manager.</p>
-<p>You can launch the Android SDK and AVD Manager in one of the following ways:</p>
+<p>You can launch the Android SDK Manager in one of the following ways:</p>
<ul>
- <li>From within Eclipse, select <strong>Window &gt; Android SDK and AVD Manager</strong>.</li>
+ <li>From within Eclipse, select <strong>Window &gt; Android SDK Manager</strong>.</li>
<li>On Windows, double-click the <code>SDK Manager.exe</code> file at the root of the Android
SDK directory.</li>
<li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
Android SDK, then execute: <pre>android</pre> </li>
</ul>
-<p>To download components, use the graphical UI of the Android SDK and AVD
+<p>To download packages, use the graphical UI of the Android SDK
Manager to browse the SDK repository and select new or updated
-components (see figure 1). The Android SDK and AVD Manager installs the selected components in
-your SDK environment. For information about which components you should download, see <a
-href="#which">Recommended Components</a>.</p>
+packages (see figure 1). The Android SDK Manager installs the selected packages in
+your SDK environment. For information about which packages you should download, see <a
+href="#which">Recommended Packages</a>.</p>
<img src="/images/sdk_manager_packages.png" />
-<p class="img-caption"><strong>Figure 1.</strong> The Android SDK and AVD Manager's
-<strong>Available Packages</strong> panel, which shows the SDK components that are
+<p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager's
+<strong>Available Packages</strong> panel, which shows the SDK packages that are
available for you to download into your environment.</p>
-<h3 id="components">Available Components</h3>
+<h3 id="components">Available Packages</h3>
-<p>By default, there are two repositories of components for your SDK: <em>Android
+<p>By default, there are two repositories of packages for your SDK: <em>Android
Repository</em> and <em>Third party Add-ons</em>.</p>
-<p>The <em>Android Repository</em> offers these types of components:</p>
+<p>The <em>Android Repository</em> offers these types of packages:</p>
<ul>
<li><strong>SDK Tools</strong> &mdash; Contains tools for debugging and testing your application
@@ -219,9 +219,9 @@ developer guide.</li>
<li><strong>Android platforms</strong> &mdash; An SDK platform is
available for every production Android platform deployable to Android-powered devices. Each
-SDK platform component includes a fully compliant Android library, system image, sample code,
+SDK platform package includes a fully compliant Android library, system image, sample code,
and emulator skins. To learn more about a specific platform, see the list of platforms that appears
-under the section "Downloadable SDK Components" on the left part of this page.</li>
+under the section "Downloadable SDK Packages" on the left part of this page.</li>
<li><strong>USB Driver for Windows</strong> (Windows only) &mdash; Contains driver files
that you can install on your Windows computer, so that you can run and debug
@@ -243,16 +243,16 @@ tutorials. --></li>
multiversion documentation for the Android framework API. </li>
</ul>
-<p>The <em>Third party Add-ons</em> provide components that allow you to create a development
+<p>The <em>Third party Add-ons</em> provide packages that allow you to create a development
environment using a specific Android external library (such as the Google Maps library) or a
customized (but fully compliant) Android system image. You can add additional Add-on repositories by
clicking <strong>Add Add-on Site</strong>.</p>
-<h3 id="which">Recommended Components</h3>
+<h3 id="which">Recommended Packages</h3>
-<p>The SDK repository contains a range of components that you can download.
-Use the table below to determine which components you need, based on whether you
+<p>The SDK repository contains a range of packages that you can download.
+Use the table below to determine which packages you need, based on whether you
want to set up a basic, recommended, or full development environment:
</p>
@@ -260,7 +260,7 @@ want to set up a basic, recommended, or full development environment:
<tr>
<th>Environment</th>
-<th>SDK&nbsp;Component</th>
+<th>SDK&nbsp;Package</th>
<th>Comments</th>
</tr>
@@ -268,8 +268,8 @@ want to set up a basic, recommended, or full development environment:
<td rowspan="3" style="font-size:.9em;background-color:#FFE;">Basic</td>
<td style="font-size:.9em;background-color:#FFE;">SDK Tools</td>
<td style="font-size:.9em;background-color:#FFE;">If you've just installed
-the SDK starter package, then you already have the latest version of this component. The
-SDK Tools component is required to develop an Android application. Make sure you keep this up to
+the SDK starter package, then you already have the latest version of this package. The
+SDK Tools package is required to develop an Android application. Make sure you keep this up to
date.</td>
</tr>
@@ -300,21 +300,21 @@ style="border:none"></td>
<tr>
<td rowspan="3">Recommended<br/>(plus Basic)</td>
<td>Documentation</td>
-<td>The Documentation component is useful because it lets you work offline and
+<td>The Documentation package is useful because it lets you work offline and
also look up API reference information from inside Eclipse.</td>
</tr>
<tr>
<td>Samples</td>
-<td>The Samples components give you source code that you can use to learn about
+<td>The Samples packages give you source code that you can use to learn about
Android, load as a project and run, or reuse in your own app. Note that multiple
-samples components are available &mdash; one for each Android platform version. When
-you are choosing a samples component to download, select the one whose API Level
+samples packages are available &mdash; one for each Android platform version. When
+you are choosing a samples package to download, select the one whose API Level
matches the API Level of the Android platform that you plan to use.</td>
</tr>
<tr>
<td>Usb Driver</td>
-<td>The Usb Driver component is needed only if you are developing on Windows and
+<td>The Usb Driver package is needed only if you are developing on Windows and
have an Android-powered device on which you want to install your application for
debugging and testing. For Mac OS X and Linux platforms, no
special driver is needed.</td>
@@ -344,12 +344,12 @@ applications on different platforms by running in an Android Virtual Device
</table>
-<p>Once you've installed at least the basic configuration of SDK components, you're ready to start
+<p>Once you've installed at least the basic configuration of SDK packages, you're ready to start
developing Android apps. The next section describes the contents of the Android SDK to familiarize
-you with the components you've just installed.</p>
+you with the packages you've just installed.</p>
-<p>For more information about using the Android SDK and AVD Manager, see the <a
-href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a> document. </p>
+<p>For more information about using the Android SDK Manager, see the <a
+href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a> document. </p>
<h2 id="sdkContents">Step 5. Exploring the SDK (Optional)</h2>
@@ -358,7 +358,7 @@ href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a> document.
and add-ons that you need, we suggest that you open the SDK directory and take a look at what's
inside.</p>
-<p>The table below describes the full SDK directory contents, with components
+<p>The table below describes the full SDK directory contents, with packages
installed. </p>
<table>
@@ -405,20 +405,21 @@ platform version.</td>
<tr>
<td colspan="3"><code>tools/</code></td>
<td>Contains the set of development and profiling tools that are platform-independent, such
-as the emulator, the Android SDK and AVD Manager, <code>ddms</code>, <code>hierarchyviewer</code>
-and more. The tools in this directory may be updated at any time using the Android SDK and AVD
+as the emulator, the Android SDK Manager, the AVD Manager, <code>ddms</code>,
+<code>hierarchyviewer</code>
+and more. The tools in this directory may be updated at any time using the Android SDK
Manager and are independent of platform releases.</td>
</tr>
<tr>
<td colspan="3"><code>SDK Readme.txt</code></td>
<td>A file that explains how to perform the initial setup of your SDK,
-including how to launch the Android SDK and AVD Manager tool on all
+including how to launch the Android SDK Manager tool on all
platforms.</td>
</tr>
<tr>
<td colspan="3"><code>SDK Manager.exe</code></td>
-<td>Windows SDK only. A shortcut that launches the Android SDK and AVD
-Manager tool, which you use to add components to your SDK.</td>
+<td>Windows SDK only. A shortcut that launches the Android SDK
+Manager tool, which you use to add packages to your SDK.</td>
</tr>
<!--<tr>
<td colspan="3"><code>documentation.html</code></td>
@@ -531,7 +532,7 @@ second step in getting started with Android development. </p>
<li>The Android SDK includes sample code and applications for each platform
version. You can browse the samples in the <a
href="{@docRoot}resources/index.html">Resources</a> tab or download them
-into your SDK using the Android SDK and AVD Manager. Once you've downloaded the
+into your SDK using the Android SDK Manager. Once you've downloaded the
samples, you'll find them in
<code><em>&lt;sdk&gt;</em>/samples/<em>&lt;platform&gt;/</em></code>. </li>
</ul>
diff --git a/docs/html/sdk/oem-usb.jd b/docs/html/sdk/oem-usb.jd
index 818a0af..88d66dd 100644
--- a/docs/html/sdk/oem-usb.jd
+++ b/docs/html/sdk/oem-usb.jd
@@ -314,6 +314,10 @@ href="http://developer.sonyericsson.com/wportal/devworld/search-downloads/driver
href="http://www.teleepoch.com/android.html">http://www.teleepoch.com/android.html</a></td>
</tr>
+<tr><td>Yulong Coolpad</td> <td><a
+href="http://www.yulong.com/product/product/product/downloadList.html#downListUL">http://www.yulong.com/product/product/product/downloadList.html#downListUL</a></td>
+</tr>
+
<tr>
<td>ZTE</td> <td><a
href="http://support.zte.com.cn/support/news/NewsDetail.aspx?newsId=1000442">http://support.zte.com.cn/support/news/NewsDetail.aspx?newsId=1000442</a></td></tr>
diff --git a/docs/html/sdk/sdk_toc.cs b/docs/html/sdk/sdk_toc.cs
index 5a5517c..5413784 100644
--- a/docs/html/sdk/sdk_toc.cs
+++ b/docs/html/sdk/sdk_toc.cs
@@ -55,7 +55,7 @@ class="new">new!</span></li>
/if ?>
<li>
<span class="heading">
- <span class="en">Downloadable SDK Components</span>
+ <span class="en">Downloadable SDK Packages</span>
<span style="display:none" class="de"></span>
<span style="display:none" class="es"></span>
<span style="display:none" class="fr"></span>
@@ -66,7 +66,7 @@ class="new">new!</span></li>
</span>
<ul>
<li><a href="<?cs var:toroot ?>sdk/adding-components.html">
- <span class="en">Adding SDK Components</span>
+ <span class="en">Adding SDK Packages</span>
<span style="display:none" class="de"></span>
<span style="display:none" class="es"></span>
<span style="display:none" class="fr"></span>
diff --git a/docs/html/sdk/win-usb.jd b/docs/html/sdk/win-usb.jd
index 6869d74..3be0faf 100644
--- a/docs/html/sdk/win-usb.jd
+++ b/docs/html/sdk/win-usb.jd
@@ -12,7 +12,7 @@ page.title=Google USB Driver
<ol>
<li><a href="{@docRoot}sdk/oem-usb.html#InstallingDriver">Installing a USB Driver</a></li>
<li><a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a></li>
- <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
+ <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Packages</a></li>
</ol>
</div>
</div>
@@ -51,7 +51,7 @@ for Windows. </p>
<p>The sections below provide notes about successive revisions of the USB Driver
for Windows, as denoted by revision number. To determine what revision of the
USB Driver for Windows you are using, refer to the "Installed Packages" listing
-in the Android SDK and AVD Manager.</p>
+in the Android SDK Manager.</p>
<script type="text/javascript">
function toggleDiv(link) {
@@ -149,7 +149,7 @@ for the T-Mobile G1 and myTouch 3G (and similar devices).</p></dt>
<div class="figure" style="width:536px;margin:0">
<img src="{@docRoot}images/developing/sdk-usb-driver.png" alt="" />
- <p class="img-caption"><strong>Figure 1.</strong> The SDK and AVD Manager
+ <p class="img-caption"><strong>Figure 1.</strong> The SDK Manager
with the Google USB Driver selected.</p>
</div>
@@ -158,10 +158,10 @@ component. You need the driver only if you are developing on Windows and
want to connect an Android-powered device (ADP, Nexus One, or Nexus S) to your
development environment over USB. </p>
-<p>To download the driver, use the Android SDK and AVD Manager tool that is
+<p>To download the driver, use the Android SDK Manager tool that is
included with the <a href="{@docRoot}sdk/index.html">Android SDK</a>:</p>
<ol>
- <li>Launch the SDK and AVD Manager by double-clicking <code>SDK Manager.exe</code>,
+ <li>Launch the Android SDK Manager by double-clicking <code>SDK Manager.exe</code>,
at the root of your SDK directory.</li>
<li>Expand <em>Extras</em>.</li>
<li>Check <strong>Google USB Driver package</strong> and click <strong>Install</strong>.</li>
diff --git a/docs/html/training/efficient-downloads/connectivity_patterns.jd b/docs/html/training/efficient-downloads/connectivity_patterns.jd
new file mode 100644
index 0000000..81f1540
--- /dev/null
+++ b/docs/html/training/efficient-downloads/connectivity_patterns.jd
@@ -0,0 +1,76 @@
+page.title=Modifying your Download Patterns Based on the Connectivity Type
+parent.title=Transferring Data Without Draining the Battery
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Redundant Downloads are Redundant
+previous.link=redundant_redundant.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#WiFi">Use Wi-Fi</a></li>
+ <li><a href="#Bandwidth">Use greater bandwidth to download more data less often</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
+</ul>
+
+</div>
+</div>
+
+<p>When it comes to impact on battery life, not all connection types are created equal. Not only does the Wi-Fi radio use significantly less battery than its wireless radio counterparts, but the radios used in different wireless radio technologies have different battery implications.</p>
+
+<h2 id="WiFi">Use Wi-Fi</h2>
+
+<p>In most cases a Wi-Fi radio will offer greater bandwidth at a significantly lower battery cost. As a result, you should endeavor to perform data transfers when connected over Wi-Fi whenever possible.</p>
+
+<p>You can use a broadcast receiver to listen for connectivity changes that indicate when a Wi-Fi connection has been established to execute significant downloads, preempt scheduled updates, and potentially even temporarily increase the frequency of regular updates as described in <a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a> lesson <a href="{@docRoot}training/monitoring-device-state/connectivity-monitoring.html">Determining and Monitoring the Connectivity Status</a>.</p>
+
+<h2 id="Bandwidth">Use Greater Bandwidth to Download More Data Less Often</h2>
+
+<p>When connected over a wireless radio, higher bandwidth generally comes at the price of higher battery cost. Meaning that LTE typically consumes more energy than 3G, which is in turn more expensive than 2G.</p>
+
+<p>This means that while the underlying radio state machine varies based on the radio technology, generally speaking the relative battery impact of the state change tail-time is greater for higher bandwidth radios.</p>
+
+<p>At the same time, the higher bandwidth means you can prefetch more aggressively, downloading more data over the same time. Perhaps less intuitively, because the tail-time battery cost is relatively higher, it's also more efficient to keep the radio active for longer periods during each transfer session to reduce the frequency of updates.</p>
+
+<p>For example, if an LTE radio is has double the bandwidth and double the energy cost of 3G, you should download 4 times as much data during each session&mdash;or potentially as much as 10mb. When downloading this much data, it's important to consider the effect of your prefetching on the available local storage and flush your prefetch cache regularly.</p>
+
+<p>You can use the connectivity manager to determine the active wireless radio, and modify your prefetching routines accordingly:</p>
+
+<pre>ConnectivityManager cm =
+ (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
+
+TelephonyManager tm =
+ (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
+
+NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
+
+int PrefetchCacheSize = DEFAULT_PREFETCH_CACHE;
+
+switch (activeNetwork.getType()) {
+ case (ConnectivityManager.TYPE_WIFI):
+ PrefetchCacheSize = MAX_PREFETCH_CACHE; break;
+ case (ConnectivityManager.TYPE_MOBILE): {
+ switch (tm.getNetworkType()) {
+ case (TelephonyManager.NETWORK_TYPE_LTE |
+ TelephonyManager.NETWORK_TYPE_HSPAP):
+ PrefetchCacheSize *= 4;
+ break;
+ case (TelephonyManager.NETWORK_TYPE_EDGE |
+ TelephonyManager.NETWORK_TYPE_GPRS):
+ PrefetchCacheSize /= 2;
+ break;
+ default: break;
+ }
+ break;
+ }
+ default: break;
+}</pre> \ No newline at end of file
diff --git a/docs/html/training/efficient-downloads/efficient-network-access.jd b/docs/html/training/efficient-downloads/efficient-network-access.jd
new file mode 100644
index 0000000..0efad7d
--- /dev/null
+++ b/docs/html/training/efficient-downloads/efficient-network-access.jd
@@ -0,0 +1,170 @@
+page.title=Optimizing Downloads for Efficient Network Access
+parent.title=Transferring Data Without Draining the Battery
+parent.link=index.html
+
+trainingnavtop=true
+next.title=Minimizing the Effect of Regular Updates
+next.link=regular_updates.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#RadioStateMachine">Understand the radio state machine</a></li>
+ <li><a href="#AppsStateMachine">Understand how apps can impact the radio state machine</a></li>
+ <li><a href="#PrefetchData">Efficiently prefetch data</a></li>
+ <li><a href="#BatchTransfers">Batch transfers and connections</a></li>
+ <li><a href="#ReduceConnections">Reduce the number of connections you use</a></li>
+ <li><a href="#DDMSNetworkTraffic">Use the DDMS Network Traffic Tool to identify areas of concern</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
+</ul>
+
+</div>
+</div>
+
+<p>Using the wireless radio to transfer data is potentially one of your app's most significant sources of battery drain. To minimize the battery drain associated with network activity, it's critical that you understand how your connectivity model will affect the underlying radio hardware.</p>
+
+<p>This lesson introduces the wireless radio state machine and explains how your app's connectivity model interacts with it. It goes on to propose ways to minimize your data connections, use prefetching, and bundle your transfers in order to minimize the battery drain associated with your data transfers.</p>
+
+<h2 id="RadioStateMachine">The Radio State Machine</h2>
+
+<p>A fully active wireless radio consumes significant power, so it transitions between different energy states in order to conserve power when not in use, while attempting to minimize latency associated with "powering up" the radio when it's required.</p>
+
+<p>The state machine for a typical 3G network radio consists of three energy states:
+<ol><li><b>Full power</b>: Used when a connection is active, allowing the device to transfer data at its highest possible rate.</li>
+<li><b>Low power</b>: An intermediate state that uses around 50% of the battery power at the full state.</li>
+<li><b>Standby</b>: The minimal energy state during which no network connection is active or required.</li>
+</ol></p>
+
+<p>While the low and idle states drain significantly less battery, they also introduce significant latency to network requests. Returning to full power from the low state takes around 1.5 seconds, while moving from idle to full can take over 2 seconds.</p>
+
+<p>To minimize latency, the state machine uses a delay to postpone the transition to lower energy states. Figure 1 uses AT&T's timings for a typical 3G radio.</p>
+
+<img src="{@docRoot}images/efficient-downloads/mobile_radio_state_machine.png" />
+<p class="img-caption"><strong>Figure 1.</strong> Typical 3G wireless radio state machine.</p>
+
+<p>The radio state machine on each device, particularly the associated transition delay ("tail time") and startup latency, will vary based on the wireless radio technology employed (2G, 3G, LTE, etc.) and is defined and configured by the carrier network over which the device is operating.</p>
+
+<p>This lesson describes a representative state machine for a typical 3G wireless radio, based on <a href="http://www.research.att.com/articles/featured_stories/2011_03/201102_Energy_efficient?fbid=1zObBOMOZSB">data provided by AT&T</a>. However, the general principles and resulting best practices are applicable for all wireless radio implementations.</p>
+
+<p>This approach is particularly effective for typical web browsing as it prevents unwelcome latency while users browse the web. The relatively low tail-time also ensures that once a browsing session has finished, the radio can move to a lower energy state.</p>
+
+<p>Unfortunately, this approach can lead to inefficient apps on modern smartphone OSs like Android, where apps run both in the foreground (where latency is important) and in the background (where battery life should be prioritized).</p>
+
+<h2 id="AppsStateMachine">How Apps Impact the Radio State Machine</h2>
+
+<p>Every time you create a new network connection, the radio transitions to the full power state. In the case of the typical 3G radio state machine described above, it will remain at full power for the duration of your transfer&mdash;plus an additional 5 seconds of tail time&mdash;followed by 12 seconds at the low energy state. So for a typical 3G device, every data transfer session will cause the radio to draw energy for almost 20 seconds.</p>
+
+<p>In practice, this means an app that transfers unbundled data for 1 second every 18 seconds will keep the wireless radio perpetually active, moving it back to high power just as it was about to become idle. As a result, every minute it will consume battery at the high power state for 18 seconds, and at the low power state for the remaining 42 seconds.</p>
+
+<p>By comparison, the same app that bundles transfers of 3 seconds of every minute will keep the radio in the high power state for only 8 seconds, and will keep it in the low power state for only an additional 12 seconds.</p>
+
+<p>The second example allows the radio to be idle for an additional 40 second every minute, resulting in a massive reduction in battery consumption.</p>
+
+<img src="{@docRoot}images/efficient-downloads/graphs.png" />
+<p class="img-caption"><strong>Figure 2.</strong> Relative wireless radio power use for bundled versus unbundled transfers.</p>
+
+<h2 id="PrefetchData">Prefetch Data</h2>
+
+<p>Prefetching data is an effective way to reduce the number of independent data transfer sessions. Prefetching allows you to download all the data you are likely to need for a given time period in a single burst, over a single connection, at full capacity.</p>
+
+<p>By front loading your transfers, you reduce the number of radio activations required to download the data. As a result you not only conserve battery life, but also improve the latency, lower the required bandwidth, and reduce download times.</p>
+
+<p>Prefetching also provides an improved user experience by minimizing in-app latency caused by waiting for downloads to complete before performing an action or viewing data.</p>
+
+<p>However, used too aggressively, prefetching introduces the risk of increasing battery drain and bandwidth use&mdash;as well as download quota&mdash;by downloading data that isn't used. It's also important to ensure that prefetching doesn't delay application startup while the app waits for the prefetch to complete. In practical terms that might mean processing data progressively, or initiating consecutive transfers prioritized such that the data required for application startup is downloaded and processed first.</p>
+
+<p>How aggressively you prefetch depends on the size of the data being downloaded and the likelihood of it being used. As a rough guide, based on the state machine described above, for data that has a 50% chance of being used within the current user session, you can typically prefetch for around 6 seconds (approximately 1-2 Mb) before the potential cost of downloading unused data matches the potential savings of not downloading that data to begin with.</p>
+
+<p>Generally speaking, it's good practice to prefetch data such that you will only need to initiate another download every 2 to 5 minutes, and in the order of 1 to 5 megabytes.</p>
+
+<p>Following this principle, large downloads&mdash;such as video files&mdash;should be downloaded in chunks at regular intervals (every 2 to 5 minutes), effectively prefetching only the video data likely to be viewed in the next few minutes.</p>
+
+<p>Note that further downloads should be bundled, as described in the next section, <a href="#BatchTransfers">Batch Transfers and Connections</a>, and that these approximations will vary based on the connection type and speed, as discussed in <a href="connectivity_patterns.html">Modify your Download Patterns Based on the Connectivity Type</a>.</p>
+
+<p>Let's look at some practical examples:</p>
+
+<p><b>A music player</b></p>
+
+<p>You could choose to prefetch an entire album, however should the user stop listening after the first song, you've wasted a significant amount of bandwidth and battery life.</p>
+
+<p>A better approach would be to maintain a buffer of one song in addition to the one being played. For streaming music, rather than maintaining a continuous stream that keeps the radio active at all times, consider using HTTP live streaming to transmit the audio stream in bursts, simulating the prefetching approach described above.</p>
+
+<p><b>A news reader</b></p>
+
+<p>Many news apps attempt to reduce bandwidth by downloading headlines only after a category has been selected, full articles only when the user wants to read them, and thumbnails just as they scroll into view.</p>
+
+<p>Using this approach, the radio will be forced to remain active for the majority of users' news-reading session as they scroll headlines, change categories, and read articles. Not only that, but the constant switching between energy states will result in significant latency when switching categories or reading articles.</p>
+
+<p>A better approach would be to prefetch a reasonable amount of data at startup, beginning with the first set of news headlines and thumbnails&mdash;ensuring a low latency startup time&mdash;and continuing with the remaining headlines and thumbnails, as well as the article text for each article available from at least the primary headline list.</p>
+
+<p>Another alternative is to prefetch every headline, thumbnail, article text, and possibly even full article pictures&mdash;typically in the background on a predetermined schedule. This approach risks spending significant bandwidth and battery life downloading content that's never used, so it should be implemented with caution.</p>
+
+<p>One solution is to schedule the full download to occur only when connected to Wi-Fi, and possibly only when the device is charging. This is investigated in more detail in <a href="connectivity_patterns.html">Modify your Download Patterns Based on the Connectivity Type</a>.</p>
+
+<h2 id="BatchTransfers">Batch Transfers and Connections</h2>
+
+Every time you initiate a connection&mdash;irrespective of the size of the associated data transfer&mdash;you potentially cause the radio to draw power for nearly 20 seconds when using a typical 3G wireless radio.</p>
+
+<p>An app that pings the server every 20 seconds, just to acknowledge that the app is running and visible to the user, will keep the radio powered on indefinitely, resulting in a significant battery cost for almost no actual data transfer.</p>
+
+<p>With that in mind it's important to bundle your data transfers and create a pending transfer queue. Done correctly, you can effectively phase-shift transfers that are due to occur within a similar time window, to make them all happen simultaneously&mdash;ensuring that the radio draws power for as short a duration as possible.</p>
+
+<p>The underlying philosophy of this approach is to transfer as much data as possible during each transfer session in an effort to limit the number of sessions you require.</p>
+
+<p>That means you should batch your transfers by queuing delay tolerant transfers, and preempting scheduled updates and prefetches, so that they are all executed when time-sensitive transfers are required. Similarly, your scheduled updates and regular prefetching should initiate the execution of your pending transfer queue.</p>
+
+<p>For a practical example, let's return to the earlier examples from <a href="#PrefetchData">Prefetch Data</a>.</p>
+
+<p>Take a news application that uses the prefetching routine described above. The news reader collects analytics information to understand the reading patterns of its users and to rank the most popular stories. To keep the news fresh, it checks for updates every hour. To conserve bandwidth, rather than download full photos for each article, it prefetches only thumbnails and downloads the full photos when they are selected.</p>
+
+<p>In this example, all the analytics information collected within the app should be bundled together and queued for download, rather than being transmitted as it's collected. The resulting bundle should be transferred when either a full-sized photo is being downloaded, or when an hourly update is being performed.</p>
+
+<p>Any time-sensitive or on-demand transfer&mdash;such as downloading a full-sized image&mdash;should preempt regularly scheduled updates. The planned update should be executed at the same time as the on-demand transfer, with the next update scheduled to occur after the set interval. This approach mitigates the cost of performing a regular update by piggy-backing on the necessary time-sensitive photo download.</p>
+
+<h2 id="ReduceConnections">Reduce Connections</h2>
+
+<p>It's generally more efficient to reuse existing network connections than to initiate new ones. Reusing connections also allows the network to more intelligently react to congestion and related network data issues.</p>
+
+<p>Rather than creating multiple simultaneous connections to download data, or chaining multiple consecutive GET requests, where possible you should bundle those requests into a single GET.</p>
+
+<p>For example, it would be more efficient to make a single request for every news article to be returned in a single request / response than to make multiple queries for several news categories.
+The wireless radio needs to become active in order to transmit the termination / termination acknowledgement packets associated with server and client timeout, so it's also good practice to close your connections when they aren't in use, rather than waiting for these timeouts.</p>
+
+<p>That said, closing a connection too early can prevent it from being reused, which then requires additional overhead for establishing a new connection. A useful compromise is not to close the connection immediately, but to still close it before the inherent timeout expires.</p>
+
+<h2 id="DDMSNetworkTraffic">Use the DDMS Network Traffic Tool to Identify Areas of Concern</h2>
+
+<p>The Android <a href="{@docRoot}guide/developing/debugging/ddms.html">DDMS (Dalvik Debug Monitor Server)</a> includes a Detailed Network Usage tab that makes it possible to track when your application is making network requests. Using this tool, you can monitor how and when your app transfers data and optimize the underlying code appropriately.</p>
+
+<p>Figure 3 shows a pattern of transferring small amounts of data roughly 15 seconds apart, suggesting that efficiency could be dramatically improved by prefetching each request or bundling the uploads.</p>
+
+<img src="{@docRoot}images/efficient-downloads/DDMS.png" />
+<p class="img-caption"><strong>Figure 3.</strong> Tracking network usage with DDMS.</p>
+
+<p>By monitoring the frequency of your data transfers, and the amount of data transferred during each connection, you can identify areas of your application that can be made more battery-efficient. Generally, you will be looking for short spikes that can be delayed, or that should cause a later transfer to be preempted.</p>
+
+<p>To better identify the cause of transfer spikes, the Traffic Stats API allows you to tag the data transfers occurring within a thread using the {@code TrafficStats.setThreadStatsTag()} method, followed by manually tagging (and untagging) individual sockets using {@code tagSocket()} and {@code untagSocket()}. For example:</p>
+
+<pre>TrafficStats.setThreadStatsTag(0xF00D);
+TrafficStats.tagSocket(outputSocket);
+// Transfer data using socket
+TrafficStats.untagSocket(outputSocket);</pre>
+
+<p>The Apache {@code HttpClient} and {@code URLConnection} libraries automatically tag sockets based on the current {@code getThreadStatsTag()} value. These libraries also tag and untag sockets when recycled through keep-alive pools.</p>
+
+<pre>TrafficStats.setThreadStatsTag(0xF00D);
+try {
+ // Make network request using HttpClient.execute()
+} finally {
+ TrafficStats.clearThreadStatsTag();
+}</pre>
+
+<p>Socket tagging is supported in Android 4.0, but real-time stats will only be displayed on devices running Android 4.0.3 or higher.</p> \ No newline at end of file
diff --git a/docs/html/training/efficient-downloads/index.jd b/docs/html/training/efficient-downloads/index.jd
new file mode 100644
index 0000000..a29be91
--- /dev/null
+++ b/docs/html/training/efficient-downloads/index.jd
@@ -0,0 +1,51 @@
+page.title=Transferring Data Without Draining the Battery
+
+trainingnavtop=true
+startpage=true
+next.title=Optimizing Downloads for Efficient Network Access
+next.link=efficient-network-access.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<!-- Required platform, tools, add-ons, devices, knowledge, etc. -->
+<h2>Dependencies and prerequisites</h2>
+<ul>
+ <li>Android 2.0 (API Level 5) or higher</li>
+</ul>
+
+<!-- related docs (NOT javadocs) -->
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
+</ul>
+
+</div>
+</div>
+
+<p>In this class you will learn to minimize the battery life impact of downloads and network connections, particularly in relation to the wireless radio.</P
+
+<p>This class demonstrates the best practices for scheduling and executing downloads using techniques such as caching, polling, and prefetching. You will learn how the power-use profile of the wireless radio can affect your choices on when, what, and how to transfer data in order to minimize impact on battery life.</p>
+
+<h2>Lessons</h2>
+
+<!-- Create a list of the lessons in this class along with a short description of each lesson.
+These should be short and to the point. It should be clear from reading the summary whether someone
+will want to jump to a lesson or not.-->
+
+<dl>
+ <dt><b><a href="efficient-network-access.html">Optimizing Downloads for Efficient Network Access</a></b></dt>
+ <dd>This lesson introduces the wireless radio state machine, explains how your app’s connectivity model interacts with it, and how you can minimize your data connection and use prefetching and bundling to minimize the battery drain associated with your data transfers.</dd>
+
+ <dt><b><a href="regular_updates.html">Minimizing the Effect of Regular Updates</a></b></dt>
+ <dd>This lesson will examine how your refresh frequency can be varied to best mitigate the effect of background updates on the underlying wireless radio state machine.</dd>
+
+ <dt><b><a href="redundant_redundant.html">Redundant Downloads are Redundant</a></b></dt>
+ <dd>The most fundamental way to reduce your downloads is to download only what you need. This lesson introduces some best practices to eliminate redundant downloads.</dd>
+
+ <dt><b><a href="connectivity_patterns.html">Modifying your Download Patterns Based on the Connectivity Type</a></b></dt>
+ <dd>When it comes to impact on battery life, not all connection types are created equal. Not only does the Wi-Fi radio use significantly less battery than its wireless radio counterparts, but the radios used in different wireless radio technologies have different battery implications.</dd>
+
+</dl>
diff --git a/docs/html/training/efficient-downloads/redundant_redundant.jd b/docs/html/training/efficient-downloads/redundant_redundant.jd
new file mode 100644
index 0000000..4bf9af9
--- /dev/null
+++ b/docs/html/training/efficient-downloads/redundant_redundant.jd
@@ -0,0 +1,87 @@
+page.title=Redundant Downloads are Redundant
+parent.title=Transferring Data Without Draining the Battery
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Minimizing the Effect of Regular Updates
+previous.link=regular_updates.html
+next.title=Connectivity Based Download Patterns
+next.link=connectivity_patterns.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#LocalCache">Cache files locally</a></li>
+ <li><a href="#ResponseCache">Use the HttpURLConnection response cache</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
+</ul>
+
+</div>
+</div>
+
+<p>The most fundamental way to reduce your downloads is to download only what you need. In terms of data, that means implementing REST APIs that allow you to specify query criteria that limit the returned data by using parameters such as the time of your last update.</p>
+
+<p>Similarly, when downloading images, it's good practice to reduce the size of the images server-side, rather than downloading full-sized images that are reduced on the client.</p>
+
+<h2 id="LocalCache">Cache Files Locally</h2>
+
+<p>Another important technique is to avoid downloading duplicate data. You can do this by aggressive caching. Always cache static resources, including on-demand downloads such as full size images, for as long as reasonably possible. On-demand resources should be stored separately to enable you to regularly flush your on-demand cache to manage its size.</p>
+
+<p>To ensure that your caching doesn't result in your app displaying stale data, be sure to extract the time at which the requested content was last updated, and when it expires, from within the HTTP response headers. This will allow you to determine when the associated content should be refreshed.</p>
+
+<pre>long currentTime = System.currentTimeMillis());
+
+HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+
+long expires = conn.getHeaderFieldDate("Expires", currentTime);
+long lastModified = conn.getHeaderFieldDate("Last-Modified", currentTime);
+
+setDataExpirationDate(expires);
+
+if (lastModified < lastUpdateTime) {
+ // Skip update
+} else {
+ // Parse update
+}</pre>
+
+<p>Using this approach, you can also effectively cache dynamic content while ensuring it doesn't result in your application displaying stale information.</p>
+
+<p>You can cache non-sensitive data can in the unmanaged external cache directory:</p>
+
+<pre>Context.getExternalCacheDir();</pre>
+
+<p>Alternatively, you can use the managed / secure application cache. Note that this internal cache may be flushed when the system is running low on available storage.</p>
+
+<pre>Context.getCache();</pre>
+
+<p>Files stored in either cache location will be erased when the application is uninstalled.</p>
+
+<h2 id="ResponseCache">Use the HttpURLConnection Response Cache</h2>
+
+<p>Android 4.0 added a response cache to {@code HttpURLConnection}. You can enable HTTP response caching on supported devices using reflection as follows:</p>
+
+<pre>private void enableHttpResponseCache() {
+ try {
+ long httpCacheSize = 10 * 1024 * 1024; // 10 MiB
+ File httpCacheDir = new File(getCacheDir(), "http");
+ Class.forName("android.net.http.HttpResponseCache")
+ .getMethod("install", File.class, long.class)
+ .invoke(null, httpCacheDir, httpCacheSize);
+ } catch (Exception httpResponseCacheNotAvailable) {
+ Log.d(TAG, "HTTP response cache is unavailable.");
+ }
+}</pre>
+
+<p>This sample code will turn on the response cache on Android 4.0+ devices without affecting earlier releases.</p>
+
+<p>With the cache installed, fully cached HTTP requests can be served directly from local storage, eliminating the need to open a network connection. Conditionally cached responses can validate their freshness from the server, eliminating the bandwidth cost associated with the download.</p>
+
+<p>Uncached responses get stored in the response cache for for future requests.</p> \ No newline at end of file
diff --git a/docs/html/training/efficient-downloads/regular_updates.jd b/docs/html/training/efficient-downloads/regular_updates.jd
new file mode 100644
index 0000000..feb7a8e
--- /dev/null
+++ b/docs/html/training/efficient-downloads/regular_updates.jd
@@ -0,0 +1,102 @@
+page.title=Minimizing the Effect of Regular Updates
+parent.title=Transferring Data Without Draining the Battery
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Optimizing Downloads for Efficient Network Access
+previous.link=efficient-network-access.html
+next.title=Redundant Downloads are Redundant
+next.link=redundant_redundant.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#C2DM">Use Cloud to Device Messaging as an alternative to polling</a></li>
+ <li><a href="#OptimizedPolling">Optimize polling with inexact repeating alarms and exponential back-offs</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
+ <li><a href="http://code.google.com/android/c2dm/">Android Cloud to Device Messaging</a></li>
+</ul>
+
+</div>
+</div>
+
+<p>The optimal frequency of regular updates will vary based on device state, network connectivity, user behavior, and explicit user preferences.</p>
+
+<p><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a> discusses how to build battery-efficient apps that modify their refresh frequency based on the state of the host device. That includes disabling background service updates when you lose connectivity and reducing the rate of updates when the battery level is low.</p>
+
+<p>This lesson will examine how your refresh frequency can be varied to best mitigate the effect of background updates on the underlying wireless radio state machine.</p>
+
+<h2 id="C2DM">Use Cloud to Device Messaging as an Alternative to Polling</h2>
+
+<p>Every time your app polls your server to check if an update is required, you activate the wireless radio, drawing power unnecessarily, for up to 20 seconds on a typical 3G connection.</p>
+
+<p><a href="http://code.google.com/android/c2dm/">Android Cloud to Device Messaging (C2DM)</a> is a lightweight mechanism used to transmit data from a server to a particular app instance. Using C2DM, your server can notify your app running on a particular device that there is new data available for it.</p>
+
+<p>Compared to polling, where your app must regularly ping the server to query for new data, this event-driven model allows your app to create a new connection only when it knows there is data to download.</p>
+
+<p>The result is a reduction in unnecessary connections, and a reduced latency for updated data within your application.</p>
+
+<p>C2DM is implemented using a persistent TCP/IP connection. While it's possible to implement your own push service, it's best practice to use C2DM. This minimizes the number of persistent connections and allows the platform to optimize bandwidth and minimize the associated impact on battery life.</p>
+
+<h2 id="OptimizedPolling">Optimize Polling with Inexact Repeating Alarms and Exponential Backoffs</h2>
+
+<p>Where polling is required, it's good practice to set the default data refresh frequency of your app as low as possible without detracting from the user experience.</p>
+
+<p>A simple approach is to offer preferences to allow users to explicitly set their required update rate, allowing them to define their own balance between data freshness and battery life.</p>
+
+<p>When scheduling updates, use inexact repeating alarms that allow the system to "phase shift" the exact moment each alarm triggers.</p>
+
+<pre>int alarmType = AlarmManager.ELAPSED_REALTIME;
+long interval = AlarmManager.INTERVAL_HOUR;
+long start = System.currentTimeMillis() + interval;
+
+alarmManager.setInexactRepeating(alarmType, start, interval, pi);</pre>
+
+<p>If several alarms are scheduled to trigger at similar times, this phase-shifting will cause them to be triggered simultaneously, allowing each update to piggyback on top of a single active radio state change.</p>
+
+<p>Wherever possible, set your alarm type to {@code ELAPSED_REALTIME} or {@code RTC} rather than to their {@code _WAKEUP} equivalents. This further reduces battery impact by waiting until the phone is no longer in standby mode before the alarm triggers.</p>
+
+<p>You can further reduce the impact of these scheduled alarms by opportunistically reducing their frequency based on how recently your app was used.</p>
+
+<p>One approach is to implement an exponential back-off pattern to reduce the frequency of your updates (and / or the degree of prefetching you perform) if the app hasn't been used since the previous update. It's often useful to assert a minimum update frequency and to reset the frequency whenever the app is used, for example:</p>
+
+<pre>SharedPreferences sp =
+ context.getSharedPreferences(PREFS, Context.MODE_WORLD_READABLE);
+
+boolean appUsed = sp.getBoolean(PREFS_APPUSED, false);
+long updateInterval = sp.getLong(PREFS_INTERVAL, DEFAULT_REFRESH_INTERVAL);
+
+if (!appUsed)
+ if ((updateInterval *= 2) > MAX_REFRESH_INTERVAL)
+ updateInterval = MAX_REFRESH_INTERVAL;
+
+Editor spEdit = sp.edit();
+spEdit.putBoolean(PREFS_APPUSED, false);
+spEdit.putLong(PREFS_INTERVAL, updateInterval);
+spEdit.apply();
+
+rescheduleUpdates(updateInterval);
+executeUpdateOrPrefetch();</pre>
+
+<p>You can use a similar exponential back-off pattern to reduce the effect of failed connections and download errors.</p>
+
+<p>The cost of initiating a network connection is the same whether you are able to contact your server and download data or not. For time-sensitive transfers where successful completion is important, an exponential back-off algorithm can be used to reduce the frequency of retries in order to minimize the associated battery impact, for example:</p>
+
+<pre>private void retryIn(long interval) {
+ boolean success = attemptTransfer();
+
+ if (!success) {
+ retryIn(interval*2 < MAX_RETRY_INTERVAL ?
+ interval*2 : MAX_RETRY_INTERVAL);
+ }
+}</pre>
+
+<p>Alternatively, for transfers that are failure tolerant (such as regular updates), you can simply ignore failed connection and transfer attempts.</p> \ No newline at end of file