Merge "doc change: add rel note links to external tools site" into honeycomb
diff --git a/core/java/android/app/package.html b/core/java/android/app/package.html
index 5137600..f37f1dc 100644
--- a/core/java/android/app/package.html
+++ b/core/java/android/app/package.html
@@ -32,8 +32,9 @@
action bar.</p>
<p>For information about using some the classes in this package, see the following
-documents: <a href="{@docRoot}guide/topics/fundamentals/index.html">Application
-Fundamentals</a> (for activities, services, and fragments), <a
+documents: <a href="{@docRoot}guide/topics/fundamentals/activities.html">Activities</a>, <a
+href="{@docRoot}guide/topics/fundamentals/services.html">Services</a>, <a
+href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a>, <a
href="{@docRoot}guide/topics/ui/actionbar.html">Using the Action Bar</a>, <a
href="{@docRoot}guide/topics/ui/dialogs.html">Creating Dialogs</a>, and <a
href="{@docRoot}guide/topics/ui/notifiers/index.html">Notifying the User</a>.</p>
diff --git a/core/java/android/content/pm/package.html b/core/java/android/content/pm/package.html
index b18adb2..d55f0f7 100644
--- a/core/java/android/content/pm/package.html
+++ b/core/java/android/content/pm/package.html
@@ -5,7 +5,7 @@
permissions, services, signatures, and providers.</p>
<p>Most of the information about an application package is defined by its manifest file. For
more information, see the <a
-href="{@docRoot}guide/topics/manifest/guide/topics/manifest/manifest-intro.html">AndroidManifest.xml
-File</a> documentation.</p>
+href="{@docRoot}guide/topics/manifest/manifest-intro.html">AndroidManifest.xml File</a>
+documentation.</p>
</BODY>
</HTML>
\ No newline at end of file
diff --git a/core/java/android/widget/TimePicker.java b/core/java/android/widget/TimePicker.java
index 18d1825..029d690 100644
--- a/core/java/android/widget/TimePicker.java
+++ b/core/java/android/widget/TimePicker.java
@@ -43,8 +43,8 @@
* or 'P' to pick. For a dialog using this view, see
* {@link android.app.TimePickerDialog}.
*<p>
- * See the <a href="{@docRoot}
- * resources/tutorials/views/hello-timepicker.html">Time Picker tutorial</a>.
+ * See the <a href="{@docRoot}resources/tutorials/views/hello-timepicker.html">Time Picker
+ * tutorial</a>.
* </p>
*/
@Widget
diff --git a/docs/html/guide/developing/debugging/debugging-projects-cmdline.jd b/docs/html/guide/developing/debugging/debugging-projects-cmdline.jd
index 6800a5d..17fb1e1 100644
--- a/docs/html/guide/developing/debugging/debugging-projects-cmdline.jd
+++ b/docs/html/guide/developing/debugging/debugging-projects-cmdline.jd
@@ -1,4 +1,4 @@
-page.title=Debugging from other IDEs
+page.title=Debugging from Other IDEs
@jd:body
diff --git a/docs/html/guide/developing/testing/testing_eclipse.jd b/docs/html/guide/developing/testing/testing_eclipse.jd
index 2a5b771..b57306e 100644
--- a/docs/html/guide/developing/testing/testing_eclipse.jd
+++ b/docs/html/guide/developing/testing/testing_eclipse.jd
@@ -16,8 +16,8 @@
basic processes for creating and running applications with ADT, as described in
<a href="{@docRoot}guide/developing/projects/projects-eclipse.html">Managing Projects from
Eclipse</a>
- and <a href="guide/developing/building/building-eclipse.html">Building and Running from
-Eclipse</a>.
+ and <a href="{@docRoot}guide/developing/building/building-eclipse.html">Building and Running
+from Eclipse</a>.
You may also want to read
<a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Fundamentals</a>,
which provides an overview of the Android testing framework.
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index ce516ce..da8b9a1 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -60,14 +60,14 @@
<li class="toggle-list">
<div><a href="<?cs var:toroot ?>guide/topics/fundamentals/activities.html">
<span class="en">Activities</span>
- </a></div>
+ </a> <span class="new">new!</span></div>
<ul>
<li><a href="<?cs var:toroot ?>guide/topics/fundamentals/fragments.html">
<span class="en">Fragments</span>
</a> <span class="new">new!</span></li>
<li><a href="<?cs var:toroot ?>guide/topics/providers/loaders.html">
<span class="en">Loaders</span>
- </a><span class="new">new!</span></li>
+ </a> <span class="new">new!</span></li>
<li><a href="<?cs var:toroot ?>guide/topics/fundamentals/tasks-and-back-stack.html">
<span class="en">Tasks and Back Stack</span>
</a></li>
@@ -76,11 +76,11 @@
<li class="toggle-list">
<div><a href="<?cs var:toroot ?>guide/topics/fundamentals/services.html">
<span class="en">Services</span>
- </a></div>
+ </a> <span class="new">new!</span></div>
<ul>
<li><a href="<?cs var:toroot ?>guide/topics/fundamentals/bound-services.html">
<span class="en">Bound Services</span>
- </a></li>
+ </a> <span class="new">new!</span></li>
</ul>
</li>
<li><a href="<?cs var:toroot ?>guide/topics/providers/content-providers.html">
@@ -91,7 +91,7 @@
</a></li>
<li><a href="<?cs var:toroot ?>guide/topics/fundamentals/processes-and-threads.html">
<span class="en">Processes and Threads</span>
- </a></li>
+ </a> <span class="new">new!</span></li>
</ul>
@@ -299,6 +299,9 @@
<li><a href="<?cs var:toroot?>guide/topics/wireless/bluetooth.html">
<span class="en">Bluetooth</span>
</a></li>
+ <li><a href="<?cs var:toroot?>guide/topics/nfc/index.html">
+ <span class="en">Near Field Communication</span></a>
+ <span class="new">new!</span></li>
<li><a href="<?cs var:toroot?>guide/topics/network/sip.html">
<span class="en">Session Initiation Protocol</span></a>
<span class="new">new!</span>
@@ -416,7 +419,7 @@
<li class="toggle-list">
<div>
<a href="<?cs var:toroot ?>guide/developing/devices/index.html">
- <span class="en">Creating and Managing Virtual Devices</span>
+ <span class="en">Managing Virtual Devices</span>
</a>
</div>
<ul>
@@ -427,7 +430,7 @@
</li>
<li>
<a href="<?cs var:toroot ?>guide/developing/devices/managing-avds-cmdline.html">
- <span class="en">On the Command Line</span>
+ <span class="en">From the Command Line</span>
</a>
</li>
<li>
@@ -457,7 +460,7 @@
</li>
<li>
<a href="<?cs var:toroot ?>guide/developing/projects/projects-cmdline.html">
- <span class="en">On the Command Line</span>
+ <span class="en">From the Command Line</span>
</a>
</li>
</ul>
@@ -487,12 +490,12 @@
<ul>
<li>
<a href="<?cs var:toroot ?>guide/developing/debugging/debugging-projects.html">
- <span class="en">In Eclipse with ADT</span>
+ <span class="en">From Eclipse with ADT</span>
</a>
</li>
<li>
<a href="<?cs var:toroot ?>guide/developing/debugging/debugging-projects-cmdline.html">
- <span class="en">In Other IDEs</span>
+ <span class="en">From Other IDEs</span>
</a>
</li>
<li>
@@ -502,7 +505,7 @@
</li>
<li>
<a href="<?cs var:toroot ?>guide/developing/debugging/debugging-log.html">
- <span class="en">Reading and Writing Log Messages</span>
+ <span class="en">Reading and Writing Logs</span>
</a>
</li>
<li>
diff --git a/docs/html/guide/publishing/licensing.jd b/docs/html/guide/publishing/licensing.jd
index 5551384..de74f89 100644
--- a/docs/html/guide/publishing/licensing.jd
+++ b/docs/html/guide/publishing/licensing.jd
@@ -518,7 +518,7 @@
</ol>
<p>If you are not familiar with AVDs or how to use them, see <a
-href="{@docRoot}guide/developing/devices/index.html">Creating and Managing Virtual Devices</a>.</p>
+href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a>.</p>
<h4 id="project-update">Updating your project configuration</h4>
@@ -629,7 +629,7 @@
<p style="margin-top:.5em;">If you aren't familiar with library projects or how
to use them, see <a href="{@docRoot}guide/developing/projects/index.html#LibraryProjects">
-Creating and Managing Projects</a>.
+Managing Projects</a>.
</p>
</div>
</div>
@@ -666,8 +666,9 @@
no further configuration is needed. </p>
<p>For more information about how to create an application project or work with
-library projects in Eclipse, see <a href="{@docRoot}guide/developing/projects/projects-eclipse.html">
-Creating and Managing Projects in Eclipse</a></p>.
+library projects in Eclipse, see <a
+href="{@docRoot}guide/developing/projects/projects-eclipse.html">Managing Projects from
+Eclipse with ADT</a></p>.
<h4>Copying the LVL sources to your application</h4>
@@ -698,8 +699,8 @@
Select the "Android" properties group and click <strong>Add</strong>, then
choose the LVL library project (com_android_vending_licensing) and click
<strong>OK</strong>. For more information, see
-<a href="{@docRoot}developing/projects/projects-eclipse.html#SettingUpLibraryProject">
-Creating and Managing Projects in Eclipse</a></p>.
+<a href="{@docRoot}guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject">
+Managing Projects from Eclipse with ADT</a></p>.
<div style="margin-bottom:2em;">
@@ -727,8 +728,8 @@
</pre>
<p>For more information about working with library projects,
-see <a href="{@docRoot}developing/projects/projects-cmdline.html#SettingUpLibraryProject">
-Creating and Managing Projects on the Command Line</a></p>.
+see <a href="{@docRoot}guide/developing/projects/projects-cmdline.html#SettingUpLibraryProject">
+Managing Projects from the Command Line</a></p>.
<h2 id="app-integration">Integrating the LVL with Your Application</h2>
diff --git a/docs/html/guide/topics/advanced/aidl.jd b/docs/html/guide/topics/advanced/aidl.jd
index fef46ec..419048a 100644
--- a/docs/html/guide/topics/advanced/aidl.jd
+++ b/docs/html/guide/topics/advanced/aidl.jd
@@ -14,9 +14,11 @@
<p class="note"><strong>Note:</strong> Using AIDL is necessary only if you allow clients from
different applications to access your service for IPC and want to handle multithreading in your
service. If you do not need to perform IPC across
-different applications, you should create your interface <a href="Binder">implementing a
+different applications, you should create your interface <a
+href="{@docRoot}guide/topics/fundamentals/bound-services.html#Binder">implementing a
Binder</a> or, if you want to perform IPC, but do not need to handle multithreading, then you
-should implement your interface <a href="#Messenger">using a Messenger</a>.</p>
+should implement your interface <a
+href="{@docRoot}guide/topics/fundamentals/bound-services.html#Messenger">using a Messenger</a>.</p>
<p>Before you begin designing your AIDL interface, be aware that calls on to an AIDL interface are
direct function calls. You can not generally make assumptions about the thread in which the call
diff --git a/docs/html/guide/topics/fundamentals.jd b/docs/html/guide/topics/fundamentals.jd
index 3fdbd95..661f5cb 100644
--- a/docs/html/guide/topics/fundamentals.jd
+++ b/docs/html/guide/topics/fundamentals.jd
@@ -422,7 +422,7 @@
resources. However, you should create specialized layouts for certain screen sizes and provide
specialized images for certain densities, using alternative layout resources, and by declaring in
your manifest exactly which screen sizes your application supports with the <a
-href="{@docRoot}guide/topics/manifest/supports-screens.html">{@code
+href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
<supports-screens>}</a> element.</p>
<p>For more information, see the <a
href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a>
@@ -453,7 +453,8 @@
href="{@docRoot}guide/appendix/api-levels.html">API Level</a> (for example, Android 1.0 is API Level
1 and Android 2.3 is API Level 9). If you use any APIs that were added to the platform after
version 1.0, you should declare the minimum API Level in which those APIs were introduced using the
-<a href="{@docRoot}guide/topics/manifest/uses-sdk.html">{@code <uses-sdk>}</a> element.</dd>
+<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a>
+element.</dd>
</dl>
<p>It's important that you declare all such requirements for your application, because, when you
diff --git a/docs/html/guide/topics/fundamentals/activities.jd b/docs/html/guide/topics/fundamentals/activities.jd
index 9079ef6..5cc1b45 100644
--- a/docs/html/guide/topics/fundamentals/activities.jd
+++ b/docs/html/guide/topics/fundamentals/activities.jd
@@ -40,7 +40,7 @@
<h2>See also</h2>
<ol>
<li><a href="{@docRoot}resources/tutorials/hello-world.html">Hello World Tutorial</a></li>
- <li><a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack">Tasks and Back
+ <li><a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back
Stack</a></li>
</ol>
@@ -594,13 +594,14 @@
definition in table 1 might still be killed by the system—but that would happen only in
extreme circumstances when there is no other recourse. When an activity might be killed is
discussed more in the <a
-href="{@docRoot}guide/topics/fundamentals/processes-and-threading.html">Processes and
+href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html">Processes and
Threading</a> document.</p>
<h3 id="SavingActivityState">Saving activity state</h3>
-<p>The introduction to <a href="Lifecycle">Managing the Activity Lifecycle</a> briefly mentions that
+<p>The introduction to <a href="#Lifecycle">Managing the Activity Lifecycle</a> briefly mentions
+that
when an activity is paused or stopped, the state of the activity is retained. This is true because
the {@link android.app.Activity} object is still held in memory when it is paused or
stopped—all information about its members and current state is still alive. Thus, any changes
diff --git a/docs/html/guide/topics/fundamentals/fragments.jd b/docs/html/guide/topics/fundamentals/fragments.jd
index 7ca990e..f780960 100644
--- a/docs/html/guide/topics/fundamentals/fragments.jd
+++ b/docs/html/guide/topics/fundamentals/fragments.jd
@@ -743,7 +743,8 @@
based on the screen configuration.</p>
<p class="note"><strong>Note:</strong> The complete source code for this activity is available in
-<a href="resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentLayout.html">{@code
+<a
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentLayout.html">{@code
FragmentLayout.java}</a>.</p>
<p>The main activity applies a layout in the usual way, during {@link
diff --git a/docs/html/guide/topics/fundamentals/services.jd b/docs/html/guide/topics/fundamentals/services.jd
index d0c924a..a9dd315 100644
--- a/docs/html/guide/topics/fundamentals/services.jd
+++ b/docs/html/guide/topics/fundamentals/services.jd
@@ -121,7 +121,7 @@
android.app.Activity#onStart onStart()}, then stop it in {@link android.app.Activity#onStop
onStop()}. Also consider using {@link android.os.AsyncTask} or {@link android.os.HandlerThread},
instead of the traditional {@link java.lang.Thread} class. See the <a
-href="{@docRoot}guide/topics/fundamentals/processes-and-threading.html#Threads">Processes and
+href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html#Threads">Processes and
Threading</a> document for more information about threads.</p>
<p>Remember that if you do use a service, it still runs in your application's main thread by
default, so you should still create a new thread within the service if it performs intensive or
@@ -183,7 +183,7 @@
available again (though this also depends on the value you return from {@link
android.app.Service#onStartCommand onStartCommand()}, as discussed later). For more information
about when the system might destroy a service, see the <a
-href="{@docRoot}guide/topics/fundamentals/processes-and-threading.html">Processes and Threading</a>
+href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html">Processes and Threading</a>
document.</p>
<p>In the following sections, you'll see how you can create each type of service and how to use
diff --git a/docs/html/guide/topics/graphics/2d-graphics.jd b/docs/html/guide/topics/graphics/2d-graphics.jd
index 6594568..618cdf8 100644
--- a/docs/html/guide/topics/graphics/2d-graphics.jd
+++ b/docs/html/guide/topics/graphics/2d-graphics.jd
@@ -1,5 +1,5 @@
page.title=2D Graphics
-parent.title=2D and 3D Graphics
+parent.title=Graphics
parent.link=index.html
@jd:body
diff --git a/docs/html/guide/topics/graphics/animation.jd b/docs/html/guide/topics/graphics/animation.jd
index cd74efa..3b1716c 100644
--- a/docs/html/guide/topics/graphics/animation.jd
+++ b/docs/html/guide/topics/graphics/animation.jd
@@ -1,4 +1,6 @@
page.title=Property Animation
+parent.title=Graphics
+parent.link=index.html
@jd:body
<div id="qv-wrapper">
diff --git a/docs/html/guide/topics/graphics/opengl.jd b/docs/html/guide/topics/graphics/opengl.jd
index 4d0b223..1f51c2d 100644
--- a/docs/html/guide/topics/graphics/opengl.jd
+++ b/docs/html/guide/topics/graphics/opengl.jd
@@ -1,5 +1,5 @@
page.title=3D with OpenGL
-parent.title=2D and 3D Graphics
+parent.title=Graphics
parent.link=index.html
@jd:body
diff --git a/docs/html/guide/topics/graphics/renderscript.jd b/docs/html/guide/topics/graphics/renderscript.jd
index 0ef8a22..54737ad 100644
--- a/docs/html/guide/topics/graphics/renderscript.jd
+++ b/docs/html/guide/topics/graphics/renderscript.jd
@@ -1,4 +1,6 @@
page.title=3D Rendering and Computation with Renderscript
+parent.title=Graphics
+parent.link=index.html
@jd:body
<div id="qv-wrapper">
diff --git a/docs/html/guide/topics/graphics/view-animation.jd b/docs/html/guide/topics/graphics/view-animation.jd
index ad27e1c..eff6f70 100644
--- a/docs/html/guide/topics/graphics/view-animation.jd
+++ b/docs/html/guide/topics/graphics/view-animation.jd
@@ -1,4 +1,6 @@
page.title=View Animation
+parent.title=Graphics
+parent.link=index.html
@jd:body
<div id="qv-wrapper">
diff --git a/docs/html/guide/topics/nfc/index.jd b/docs/html/guide/topics/nfc/index.jd
new file mode 100644
index 0000000..3992099
--- /dev/null
+++ b/docs/html/guide/topics/nfc/index.jd
@@ -0,0 +1,600 @@
+page.title=Near Field Communication
+@jd:body
+
+ <div id="qv-wrapper">
+ <div id="qv">
+ <h2>Near Field Communication quickview</h2>
+
+ <ol>
+ <li><a href="#api">API Overview</a></li>
+
+ <li><a href="#manifest">Declaring Android Manifest Elements</a></li>
+
+ <li>
+ <a href="#dispatch">The Tag Dispatch System</a>
+
+ <ol>
+ <li><a href="#foreground-dispatch">Using the foreground dispatch system</a></li>
+
+ <li><a href="#intent-dispatch">Using the intent dispatch system</a></li>
+ </ol>
+ </li>
+
+ <li><a href="#ndef">NDEF messages</a></li>
+
+ <li><a href="#read">Reading an NFC tag</a></li>
+
+ <li><a href="#write">Writing to an NFC tag</a></li>
+
+ <li><a href="#p2p">Peer to Peer Data Exchange</a></li>
+ </ol>
+ </div>
+ </div>
+
+ <p>Near Field Communication (NFC) is a set of short-range wireless technologies, similar to RFID.
+ It typically requires a distance of 4 cm or less and operates at 13.56mhz and at rates ranging
+ from 106 kbit/s to 848 kbit/s. NFC communication always involves an initiator and a target. The
+ initiator actively generates an RF field that can power a passive target. This enables NFC
+ targets to take very simple form factors such as tags, stickers or cards that do not require
+ power. NFC peer-to-peer communication is also possible, where both devices are powered.</p>
+
+ <p>Compared to other wireless technologies such as Bluetooth or WiFi, NFC provides much lower
+ bandwidth and range, but provides low-cost, un-powered targets and do not require discovery or
+ pairing. Users interact with NFC tags with just a tap. Targets can range in complexity. Simple
+ tags just offer read and write capabilities, sometimes with one-time programmable areas to make
+ the card read-only. More complex tags offer math operations, and have cryptographic hardware to
+ authenticate access to a sector. The most sophisticated tags contain operating environments,
+ allowing complex interactions with applets that are running on the tag.</p>
+
+ <p>An Android device with NFC hardware typically acts as an initiator. This mode is also known as
+ NFC reader/writer. The device actively looks for NFC tags and starts activities to handle them in
+ this mode. In Android 2.3.3, devices also have some limited peer-to-peer support.</p>
+
+ <h2 id="api">API Overview</h2>
+
+ <p>The {@link android.nfc} package contain the high-level classes to interact with the local
+ device's NFC adapter, to represent discovered tags, and to use the NDEF data format.</p>
+
+ <table>
+ <tr>
+ <th>Class</th>
+
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.NfcManager}</td>
+
+ <td>A high level manager class that enumerates the NFC adapters on this Android device. Since
+ most Android devices only have one NFC adapter, you can just use the static helper {@link
+ android.nfc.NfcAdapter#getDefaultAdapter()} for most situations.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.NfcAdapter}</td>
+
+ <td>Represents the local NFC adapter and defines the Intents that are used in the tag
+ dispatch system. It provides methods to register for foreground tag dispatching and
+ foreground NDEF pushing. Foreground NDEF push is the only peer-to-peer support that is
+ currently provided in Android.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.NdefMessage} and {@link android.nfc.NdefRecord}</td>
+
+ <td>NDEF is an NFC Forum defined data structure, designed to efficiently store data on NFC
+ tags, such as Text, URLs, and other MIME types. An {@link android.nfc.NdefMessage} acts as a
+ container for the data that you want to transmit or read. One {@link android.nfc.NdefMessage}
+ object contains zero or more {@link android.nfc.NdefRecord}s. Each NDEF Record has a type
+ such as Text, URL, Smart Poster, or any MIME type. The type of the first NDEF Record in the
+ NDEF message is used to dispatch a tag to an Activity.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.Tag}</td>
+
+ <td>Represents a passive NFC target. These can come in many form factors such as a tag, card,
+ FOB, or an even more complex device doing card emulation. When a tag is discovered, a {@link
+ android.nfc.Tag} object is created and wrapped inside an Intent. The dispatch system sends
+ the Intent to a compatible Activity <code>startActivity()</code>. You can use the {@link
+ android.nfc.Tag#getTechList getTechList()} method to determine the technologies supported by
+ this tag and create the corresponding {@link android.nfc.tech.TagTechnology} object with one
+ of classes provided by {@link android.nfc.tech}.</td>
+ </tr>
+ </table>
+
+ <p>The {@link android.nfc.tech} package contains classes to query properties and perform I/O
+ operations on a tag. The classes are divided to represent different NFC technologies that can be
+ available on a Tag:</p>
+
+ <table>
+ <tr>
+ <th>Class</th>
+
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.tech.TagTechnology}</td>
+
+ <td>The interface that all Tag Technology classes must implement.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.tech.NfcA}</td>
+
+ <td>Provides access to NFC-A (ISO 14443-3A) properties and I/O operations.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.tech.NfcB}</td>
+
+ <td>Provides access to NFC-B (ISO 14443-3B) properties and I/O operations.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.tech.NfcF}</td>
+
+ <td>Provides access to NFC-F (JIS 6319-4) properties and I/O operations.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.tech.NfcV}</td>
+
+ <td>Provides access to NFC-V (ISO 15693) properties and I/O operations.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.tech.IsoDep}</td>
+
+ <td>Provides access to ISO-DEP (ISO 14443-4) properties and I/O operations.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.tech.Ndef}</td>
+
+ <td>Provides access to NDEF data and operations on NFC Tags that have been formatted as
+ NDEF.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.tech.NdefFormatable}</td>
+
+ <td>Provides a format operations for tags that may be NDEF formatable.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.tech.MifareClassic}</td>
+
+ <td>Provides access to MIFARE Classic properties and I/O operations. Not all Android devices
+ provide implementations for this class.</td>
+ </tr>
+
+ <tr>
+ <td>{@link android.nfc.tech.MifareUltralight}</td>
+
+ <td>Provides access to MIFARE Ultralight properties and I/O operations. Not all Android
+ devices provide implementations for this class.</td>
+ </tr>
+ </table>
+
+ <h2 id="manifest">Declaring Android Manifest elements</h2>
+
+ <p>Before you can access a device's NFC hardware and properly handle NFC intents, declare these
+ items in your <code>AndroidManifest.xml</code> file:</p>
+
+ <ol>
+ <li>The NFC <code><uses-permission></code> element to access the NFC hardware:
+ <pre>
+<uses-permission android:name="android.permission.NFC" />
+</pre>
+ </li>
+
+ <li>The minimum SDK version that your application can support. API level 9 only supports
+ limited tag dispatching with {@link android.nfc.NfcAdapter#ACTION_TAG_DISCOVERED}, and only
+ gives access to NDEF messages via the {@link android.nfc.NfcAdapter#EXTRA_NDEF_MESSAGES} extra.
+ No other tag properties or I/O operations are accessible. API level 10 adds comprehensive
+ reader/writer support, so you probably want to use this for more functionality.
+ <pre class="pretty-print">
+<uses-sdk android:minSdkVersion="9|10"/>
+</pre>
+ </li>
+
+ <li>The uses-feature element so that your application can show up in the Android Market for
+ devices that have NFC hardware:
+ <pre>
+<uses-feature android:name="android.hardware.nfc" android:required="true" />
+</pre>
+ </li>
+
+ <li>The NFC intent filter to tell the Android system your Activity can handle NFC data. Specify
+ one or more of these three intent filters:
+ <pre>
+<intent-filter>
+ <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
+ <data android:mimeType="<em>mime/type</em>" />
+</intent-filter>
+
+<intent-filter>
+ <action android:name="android.nfc.action.TECH_DISCOVERED"/>
+ <meta-data android:name="android.nfc.action.TECH_DISCOVERED"
+ android:resource="@xml/<em>nfc_tech_filter</em>.xml" />
+</intent-filter>
+
+<intent-filter>
+ <action android:name="android.nfc.action.TAG_DISCOVERED"/>
+</intent-filter>
+</pre>
+
+ <p>The three intent filters are prioritized and behave in specific ways. Declare only the
+ ones that your Activity needs to handle. For more information on how to handle these filters,
+ see the section about <a href="#dispatch">The Tag Dispatch System</a>.</p>
+ </li>
+ </ol>
+
+ <p>View the <a href=
+ "../../../resources/samples/NFCDemo/AndroidManifest.html">AndroidManifest.xml</a> from the
+ NFCDemo sample to see a complete example.</p>
+
+ <h2 id="dispatch">The Tag Dispatch System</h2>
+
+ <p>When an Android device scans an NFC tag, the desired behavior is to have the most appropriate
+ Activity handle the intent without asking the user what appplication to use. Because devices scan
+ NFC tags at a very short range, it is likely that making users manually select an Activity forces
+ them to move the device away from the tag and break the connection. You should develop your
+ Activity to only handle the NFC tags that your Activity cares about to prevent the Activity
+ Chooser from appearing. Android provides two systems to help you correctly identify an NFC tag
+ that your Activity should handle: the Intent dispatch system and the foreground Activity dispatch
+ system.</p>
+
+ <p>The intent dispatch system checks the intent filters of all the Activities along with the
+ types of data that the Activities support to find the best Activity that can handle the NFC tag.
+ If multiple Activities specify the same intent filter and data to handle, then the Activity
+ Chooser is presented to the user as a last resort.</p>
+
+ <p>The foreground dispatch system allows an Activity application to override the intent dispatch
+ system and have priority when an NFC tag is scanned. The Activity handling the request must be
+ running in the foreground of the device. When an NFC tag is scanned and matches the intent and
+ data type that the foreground dispatch Activity defines, the intent is immediately sent to the
+ Activity even if another Activity can handle the intent. If the Activity cannot handle the
+ intent, the foreground dispatch system falls back to the intent dispatch system.</p>
+
+ <h3 id="intent-dispatch">Using the intent dispatch system</h3>
+
+ <p>The intent dispatch system specifies three intents that each have a priority. The intents that
+ start when a device scans a tag depend on the type of tag scanned. In general, the intents are
+ started in the following manner:</p>
+
+ <ul>
+ <li>
+ <code>android.nfc.action.NDEF_DISCOVERED</code>: This intent starts when a tag that contains
+ an NDEF payload is scanned. This is the highest priority intent. The Android system does not
+ let you specify this intent generically to handle all data types. You must specify
+ <code><data></code> elements in the <code>AndroidManifest.xml</code> along with this
+ intent to correctly handle NFC tags that start this intent. For example, to handle a
+ <code>NDEF_DISCOVERED</code> intent that contains plain text, specify the following filter in
+ your <code>AndroidManifest.xml</code> file:
+ <pre>
+<intent-filter>
+ <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
+ <data android:mimeType="text/plain" />
+</intent-filter>
+</pre>
+
+ <p>If the <code>NDEF_DISCOVERED</code> intent is started, the <code>TECH_DISCOVERED</code>
+ and <code>TAG_DISCOVERED</code> intents are not started. This intent does not start if an
+ unknown tag is scanned or if the tag does not contain an NDEF payload.</p>
+ </li>
+
+ <li><code>android.nfc.action.TECH_DISCOVERED</code>: If the <code>NDEF_DISCOVERED</code> intent
+ does not start or is not filtered by any Activity on the device, this intent starts if the tag
+ is known. The <code>TECH_DISCOVERED</code> intent requires that you specify the technologies
+ that you want to support in an XML resource file. For more information, see the section about
+ <a href="#technology-resources">Specifying tag technologies to handle</a>.</li>
+
+ <li><code>android.nfc.action.TAG_DISCOVERED</code>: This intent starts if no Activities handle
+ the <code>NDEF_DISCOVERED</code> and <code>TECH_DISCOVERED</code> intents or if the tag that is
+ scanned is unknown.</li>
+ </ul>
+
+ <h4 id="tech">Specifying tag technologies to handle</h4>
+
+ <p>If your Activity declares the <code>android.nfc.action.TECH_DISCOVERED</code> intent in your
+ <code>AndroidManifest.xml</code> file, you must create an XML resource file that specifies the
+ technologies that your Activity supports. The following sample defines all of the technologies.
+ Specifiying multiple technologies within the same list tells the system
+ to filter tags that support all of the technologies. The example below never filters a tag
+ because no tag supports all of the technologies at once.
+ You can remove the ones that you do not need. Save this file (you can name it anything you wish)
+ in the <code><project-root>/res/xml</code> folder.</p>
+ <pre>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <tech-list>
+ <tech>android.nfc.tech.IsoDep</tech>
+ <tech>android.nfc.tech.NfcA</tech>
+ <tech>android.nfc.tech.NfcB</tech>
+ <tech>android.nfc.tech.NfcF</tech>
+ <tech>android.nfc.tech.NfcV</tech>
+ <tech>android.nfc.tech.Ndef</tech>
+ <tech>android.nfc.tech.NdefFormatable</tech>
+ <tech>android.nfc.tech.MifareClassic</tech>
+ <tech>android.nfc.tech.MifareUltralight</tech>
+ </tech-list>
+</resources>
+</pre>
+
+You can also specify multiple filter lists. In this case, a tag must match all of the
+technologies within one of the lists. The following example filters for
+cards that support the NfcA and Ndef technology or support the
+NfcB and Ndef technology.
+
+<pre>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <tech-list>
+ <tech>android.nfc.tech.NfcA</tech>
+ <tech>android.nfc.tech.Ndef</tech>
+ </tech-list>
+</resources>
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <tech-list>
+ <tech>android.nfc.tech.NfcB</tech>
+ <tech>android.nfc.tech.Ndef</tech>
+ </tech-list>
+</resources>
+</pre>
+
+ <p>In your <code>AndroidManifest.xml</code> file, specify the resource file that you just created
+ in the <code><meta-data></code> element inside the <code><intent-filter></code>
+ element like in the following example:</p>
+ <pre>
+<intent-filter>
+ <action android:name="android.nfc.action.TECH_DISCOVERED"/>
+ <meta-data android:name="android.nfc.action.TECH_DISCOVERED"
+ android:resource="@xml/nfc_tech_filter.xml" />
+</intent-filter>
+</pre>
+
+ <h3 id="foreground-dispatch">Using the foreground dispatch system</h3>
+
+ <p>The foreground dispatch system allows an Activity to intercept an intent and claim priority
+ over other Activities that handle the same intent. The system is easy to use and involves
+ constructing a few data structures for the Android system to be able to send the appropriate
+ intents to your application. To enable the foreground dispatch system:</p>
+
+ <ol>
+ <li>Add the following code in the onCreate() method of your Activity:
+
+ <ol type="a">
+ <li>Create a {@link android.app.PendingIntent} object so the Android system can populate it
+ with the details of the tag when it is scanned
+ <pre>
+PendingIntent pendingIntent = PendingIntent.getActivity(
+ this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
+</pre>
+ </li>
+
+ <li>Declare intent filters to handle the intents that you want to intercept. The foreground
+ dispatch system checks the specified intent filters with the intent that is received when
+ the device scans a tag. If they match, then your application handles the intent. If it does
+ not match, the foreground dispatch system falls back to the intent dispatch system.
+ Specifying a <code>null</code> array of intent filters and for the technology filters,
+ you receive a <code>TAG_DISCOVERED</code> intent for all tags discovered. Note that the
+ snippet below handles all MIME types. You should only handle the ones that you need.
+ <pre>
+ IntentFilter ndef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
+ try {
+ ndef.addDataType("*/*"); /* Handles all MIME based dispatches.
+ You should specify only the ones that you need. */
+ }
+ catch (MalformedMimeTypeException e) {
+ throw new RuntimeException("fail", e);
+ }
+ intentFiltersArray = new IntentFilter[] {
+ ndef,
+ };
+</pre>
+ </li>
+
+ <li>Set up an array of tag technologies that your application wants to handle. Call the
+ <code>Object.class.getName()</code> method to obtain the class of the technology that you
+ want to support.
+ <pre>
+
+ techListsArray = new String[][] { new String[] { NfcF.class.getName() } };
+
+</pre>
+ </li>
+ </ol>
+ </li>
+
+ <li>Override the following Activity lifecycle callbacks and add logic to enable and disable the
+ foreground dispatch when the Activity loses ({@link android.app.Activity#onPause onPause()})
+ and regains ({@link android.app.Activity#onResume onResume()}) focus. {@link
+ android.nfc.NfcAdapter#enableForegroundDispatch} must best called from the main thread and only
+ when the activity is in the foreground (calling in {@link android.app.Activity#onResume
+ onResume()} guarantees this). You also need to implement the {@link
+ android.app.Activity#onNewIntent onNewIntent} callback to process the data from the scanned NFC
+ tag.
+ <pre>
+public void onPause() {
+ super.onPause();
+ mAdapter.disableForegroundDispatch(this);
+}
+
+public void onResume() {
+ super.onResume();
+ mAdapter.enableForegroundDispatch(this, pendingIntent, intentFiltersArray, techListsArray);
+}
+
+public void onNewIntent(Intent intent) {
+ Tag tagFromIntent = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
+ //do something with tagFromIntent
+}
+</pre>
+ </li>
+ </ol>
+
+ <p>See the <a href=
+ "{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.html">ForegroundDispatch</a>
+ sample from API Demos for the complete sample.</p>
+
+ <h2 id="ndef">Working with Data on NFC tags</h2>
+
+ <p>Data on NFC tags are encoded in raw bytes, so you must convert the bytes to something human
+ readable if you are presenting the data to the user. When writing to NFC tags, you must write
+ them in bytes as well. Android provides APIs to help write messages that conform to the NDEF
+ standard, which was developed by the <a href="http://www.nfc-forum.org/specs/">NFC Forum</a> to
+ standardized data on tags. Using this standard ensures that your data will be supported by all
+ Android NFC devices if you are writing to tags. However, many tag technologies use their own
+ standard for storing data and are supported by Android as well, but you have to implement your
+ own protocol stack to read and write to these tags. You can find a full list of the supported
+ technologies in {@link android.nfc.tech} and an overview of the technolgies in the {@link
+ android.nfc.tech.TagTechnology} interface. This section is a brief overview of how to work with
+ NDEF messages in the context of the Android system. It is not meant to be a complete discussion
+ of the NDEF specification, but highlights the main things that you need to be aware of when
+ working with NDEF messages in Android.</p>
+
+ <p>To facilitate working with NDEF messages, Android provides the {@link android.nfc.NdefRecord}
+ and {@link android.nfc.NdefMessage} to encapsulate the raw bytes that represent NDEF messages. An
+ {@link android.nfc.NdefMessage} is the container for zero or more {@link
+ android.nfc.NdefRecord}s. Each {@link android.nfc.NdefRecord} has its own unique type name
+ format, record type, and ID to distinguish them from other records within the same {@link
+ android.nfc.NdefMessage}. You can store different types of records of varying length in a single
+ {@link android.nfc.NdefMessage}. The size constraint of the NFC tag determines how big your
+ {@link android.nfc.NdefMessage} can be.</p>
+
+ <p>Tags that support the {@link android.nfc.tech.Ndef} and {@link android.nfc.tech.NdefFormatable}
+ technologies return and accept {@link android.nfc.NdefMessage}
+ objects as parameters for read and write operations. You need to create your own logic to read
+ and write bytes for other tag technologies in {@link android.nfc.tech}.</p>
+
+ <p>You can download technical specifications for different types of NDEF message standards, such
+ as plain text and Smart Posters, at the <a href="http://www.nfc-forum.org/specs/">NFC Forum</a>
+ website. The NFCDemo sample application also declares sample <a href=
+ "{@docRoot}resources/samples/NFCDemo/src/com/example/android/nfc/simulator/MockNdefMessages.html">
+ plain text and SmartPoster NDEF messages.</a></p>
+
+ <h2 id="read">Reading an NFC tag</h2>
+
+ <p>When a device comes in proximity to an NFC tag, the appropriate intent is started on the
+ device, notifying interested applications that a NFC tag was scanned. By previously declaring the
+ appropriate intent filter in your <code>AndroidManifest.xml</code> file or using foreground
+ dispatching, your application can request to handle the intent.</p>
+
+ <p>The following method (slightly modified from the NFCDemo sample application), handles the
+ <code>TAG_DISCOVERED</code> intent and iterates through an array obtained from the intent that
+ contains the NDEF payload:</p>
+ <pre>
+NdefMessage[] getNdefMessages(Intent intent) {
+ // Parse the intent
+ NdefMessage[] msgs = null;
+ String action = intent.getAction();
+ if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)) {
+ Parcelable[] rawMsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);
+ if (rawMsgs != null) {
+ msgs = new NdefMessage[rawMsgs.length];
+ for (int i = 0; i < rawMsgs.length; i++) {
+ msgs[i] = (NdefMessage) rawMsgs[i];
+ }
+ }
+ else {
+ // Unknown tag type
+ byte[] empty = new byte[] {};
+ NdefRecord record = new NdefRecord(NdefRecord.TNF_UNKNOWN, empty, empty, empty);
+ NdefMessage msg = new NdefMessage(new NdefRecord[] {record});
+ msgs = new NdefMessage[] {msg};
+ }
+ }
+ else {
+ Log.e(TAG, "Unknown intent " + intent);
+ finish();
+ }
+ return msgs;
+}
+</pre>
+
+ <p>Keep in mind that the data that the device reads is in bytes, so you must implement your own
+ logic if you need to present the data in a readable format to the user. The classes in
+ <code>com.example.android.nfc.record</code> of the NFCDemo sample show you how to parse some
+ common types of NDEF messages such as plain text or a SmartPoster.</p>
+
+ <h2 id="write">Writing to an NFC tag</h2>
+
+ <p>Writing to an NFC tag involves constructing your NDEF message in bytes and using the
+ appropriate tag technology for the tag that you are writing to. The following code sample shows
+ you how to write a simple text message to a {@link android.nfc.tech.NdefFormatable} tag:</p>
+ <pre>
+NdefFormatable tag = NdefFormatable.get(t);
+Locale locale = Locale.US;
+final byte[] langBytes = locale.getLanguage().getBytes(Charsets.US_ASCII);
+String text = "Tag, you're it!";
+final byte[] textBytes = text.getBytes(Charsets.UTF_8);
+final int utfBit = 0;
+final char status = (char) (utfBit + langBytes.length);
+final byte[] data = Bytes.concat(new byte[] {(byte) status}, langBytes, textBytes);
+NdefRecord record = NdefRecord(NdefRecord.TNF_WELL_KNOWN, NdefRecord.RTD_TEXT, new byte[0], data);
+try {
+ NdefRecord[] records = {text};
+ NdefMessage message = new NdefMessage(records);
+ tag.connect();
+ tag.format(message);
+}
+catch (Exception e){
+ //do error handling
+}
+</pre>
+
+ <h2 id="p2p">Peer-to-peer data exchange</h2>
+
+ <p>Support for simple peer-to-peer data exchange is supported by the foreground push feature,
+ which is enabled with the {@link android.nfc.NfcAdapter#enableForegroundNdefPush} method. To use
+ this feature:</p>
+
+ <ul>
+ <li>The Activity that is pushing the data must be in the foreground</li>
+
+ <li>You must encapsulate the data that you are sending in an {@link android.nfc.NdefMessage}
+ object</li>
+
+ <li>The NFC device that is receiving the pushed data (the scanned device) must support the
+ <code>com.android.npp</code> NDEF push protocol, which is optional for Android devices.</li>
+</li>
+ </ul>
+
+ <p class="note">If your Activity enables the foreground push feature and is in the foreground,
+ the standard intent dispatch system is disabled. However, if your Activity also enables
+ foreground dispatching, then it can still scan tags that match the intent filters set in the
+ foreground dispatching.</p>
+
+ <p>To enable foreground dispatching:</p>
+
+ <ol>
+ <li>Create an NdefMessage that contains the NdefRecords that you want to push onto the other
+ device.</li>
+
+ <li>Implement the {@link android.app.Activity#onResume onResume()} and {@link
+ android.app.Activity#onPause onPause()} callbacks in your Activity to appropriately handle the
+ foreground pushing lifecycle. You must call {@link
+ android.nfc.NfcAdapter#enableForegroundNdefPush} from the main thread and only when the
+ activity is in the foreground (calling in {@link android.app.Activity#onResume onResume()}
+ guarantees this).
+ <pre>
+public void onResume() {
+ super.onResume();
+ if (mAdapter != null)
+ mAdapter.enableForegroundNdefPush(this, myNdefMessage);
+}
+public void onPause() {
+ super.onPause();
+ if (mAdapter != null)
+ mAdapter.disableForegroundNdefPush(this);
+}
+</pre>
+ </li>
+ </ol>
+
+ <p>When the Activity is in the foreground, you can now tap the device to another device and push
+ the data to it. See the <a href=
+ "../../../resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundNdefPush.html">ForegroundNdefPush</a>
+ sample in API Demos for a simple example of peer-to-peer data exchange.</p>
diff --git a/docs/html/guide/topics/providers/loaders.jd b/docs/html/guide/topics/providers/loaders.jd
index c54656c..ab9706b 100644
--- a/docs/html/guide/topics/providers/loaders.jd
+++ b/docs/html/guide/topics/providers/loaders.jd
@@ -29,8 +29,11 @@
<h2>Related samples</h2>
<ol>
- <li> <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentCursorLoader.html"> FragmentCursorLoader</a></li>
- <li> <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.html"> LoaderThrottle</a></li>
+ <li> <a
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentListCursorLoader.html">FragmentListCursorLoader</a></li>
+ <li> <a
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.html">
+LoaderThrottle</a></li>
</ol>
</div>
</div>
@@ -480,7 +483,7 @@
<p>There are a few different samples in <strong>ApiDemos</strong> that
illustrate how to use loaders:</p>
<ul>
- <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentCursorLoader.html"> FragmentCursorLoader</a> — A complete version of the
+ <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentListCursorLoader.html">FragmentListCursorLoader</a> — A complete version of the
snippet shown above.</li>
<li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.html"> LoaderThrottle</a> — An example of how to use throttling to
reduce the number of queries a content provider does then its data changes.</li>
diff --git a/docs/html/guide/topics/testing/testing_android.jd b/docs/html/guide/topics/testing/testing_android.jd
index 6f3048c..732524e 100755
--- a/docs/html/guide/topics/testing/testing_android.jd
+++ b/docs/html/guide/topics/testing/testing_android.jd
@@ -653,10 +653,12 @@
It guides you through a more complex testing scenario that you develop against a
more realistic application.
</li>
+ <!-- sample is not available
<li>
- The sample test package <a href="{@docRoot}resources/samples/AlarmServiceTest"}>
+ The sample test package <a href="{@docRoot}resources/samples/AlarmServiceTest/index.html">
Alarm Service Test</a> is an example of testing a {@link android.app.Service}. It contains
a set of unit tests for the Alarm Service sample application's {@link android.app.Service}.
</li>
+ -->
</ul>
diff --git a/docs/html/guide/topics/ui/actionbar.jd b/docs/html/guide/topics/ui/actionbar.jd
index b8d1928..065f95a 100644
--- a/docs/html/guide/topics/ui/actionbar.jd
+++ b/docs/html/guide/topics/ui/actionbar.jd
@@ -38,7 +38,15 @@
<li>{@link android.app.ActionBar}</li>
<li>{@link android.view.Menu}</li>
</ol>
-
+
+ <h2>Related samples</h2>
+ <ol>
+ <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#ActionBar">API
+ Demos</a></li>
+ <li><a
+href="{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a></li>
+ </ol>
+
<h2>See also</h2>
<ol>
<li><a href="{@docRoot}guide/topics/ui/menus.html">Creating Menus</a></li>
@@ -363,7 +371,7 @@
in the overflow menu as a normal menu item and you must respond to it from the {@link
android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} callback method. (For a
guide to providing search functionality, see the <a
-href="{@docRoot}gudie/topics/search/index.html">Search</a> documentation.)</p>
+href="{@docRoot}guide/topics/search/index.html">Search</a> documentation.)</p>
<p>When the activity first starts, the system populates the Action Bar and overflow menu by calling
{@link android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()}.
@@ -397,7 +405,7 @@
<img src="{@docRoot}images/ui/actionbar-tabs.png" alt="" />
<p class="img-caption"><strong>Figure 6.</strong> Screenshot of tabs in the
Action Bar, from the <a
-href="{@docRoot}resources/samples/Honeycomb-Gallery/index.html">Honeycomb Gallery</a> sample
+href="{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a> sample
application.</p>
</div>
diff --git a/docs/html/guide/topics/ui/drag-drop.jd b/docs/html/guide/topics/ui/drag-drop.jd
index 46ccdf8..c33c507 100644
--- a/docs/html/guide/topics/ui/drag-drop.jd
+++ b/docs/html/guide/topics/ui/drag-drop.jd
@@ -289,14 +289,14 @@
<p>
To get the action type, a listener calls {@link android.view.DragEvent#getAction()}. There
are six possible values, defined by constants in the {@link android.view.DragEvent} class. These
- are listed in <a href="table1">table 1</a>.
+ are listed in <a href="#table1">table 1</a>.
</p>
<p>
The {@link android.view.DragEvent} object also contains the data that your application provided
to the system in the call to
{@link android.view.View#startDrag(ClipData,View.DragShadowBuilder,Object,int) startDrag()}.
Some of the data is valid only for certain action types. The data that is valid for each action
- type is summarized in <a href="table2">table 2</a>. It is also described in detail with
+ type is summarized in <a href="#table2">table 2</a>. It is also described in detail with
the event for which it is valid in the section
<a href="#DesignDragOperation">Designing a Drag and Drop Operation</a>.
</p>
diff --git a/docs/html/resources/articles/live-wallpapers.jd b/docs/html/resources/articles/live-wallpapers.jd
index ea67fed..7510550 100644
--- a/docs/html/resources/articles/live-wallpapers.jd
+++ b/docs/html/resources/articles/live-wallpapers.jd
@@ -27,35 +27,36 @@
<img src="images/live_wallpapers_small.png" style="align:center" />
<p>Creating your own live wallpaper is easy, especially if you have had
-previous experience with <a
-href="../../../reference/android/view/SurfaceView.html"><code>SurfaceView</code></a> or <a
-href="../../../reference/android/graphics/Canvas.html"><code>Canvas</code></a>.
+previous experience with {@link android.view.SurfaceView} or {@link
+android.graphics.Canvas}.
To learn how to create a live wallpaper, you should check out the <a
href="../samples/CubeLiveWallpaper/index.html">CubeLiveWallpaper sample code</a>.</p>
-<p>In terms of implementation, a live wallpaper is very similar to a regular
-Android <a href="../../../reference/android/app/Service.html">service</a>. The
-only difference is the addition of a new method, <a
-href="../../../reference/android/service/wallpaper/WallpaperService.html#onCreateEngine()">{@code
-onCreateEngine()}</a>, whose goal is to create a <a
-href="../../../reference/android/service/wallpaper/WallpaperService.Engine.html">
-<code>WallpaperService.Engine</code></a>. The engine is responsible for
+<p>In terms of implementation, a live wallpaper is very similar to a {@link android.app.Service}.
+The only difference is the addition of a new method, {@link
+android.service.wallpaper.WallpaperService#onCreateEngine()}, whose goal is to create a {@link
+android.service.wallpaper.WallpaperService.Engine}. The engine is responsible for
handling the lifecycle and drawing of a wallpaper. The system provides a surface
-on which you can draw, just like you would with a <code>SurfaceView</code></a>.
+on which you can draw, just like you would with a {@link android.view.SurfaceView}.
Drawing a wallpaper can be very expensive so you should optimize your code
as much as possible to avoid using too much CPU, not only for battery life
but also to avoid slowing down the rest of the system. That is also why the
-most important part of the lifecycle of a wallpaper is <a href="../../../reference/android/service/wallpaper/WallpaperService.Engine.html#onVisibilityChanged%28boolean%29">when it becomes invisible</a>.
+most important part of the lifecycle of a wallpaper is when it becomes visible, as indicated
+by a call to {@link android.service.wallpaper.WallpaperService.Engine#onVisibilityChanged
+onVisibilityChanged()}.
When invisible, such as when the user launches an application that covers
the home screen, a wallpaper must stop all activity.</p>
<p>The engine can also implement several methods to interact with the user
or the home application. For instance, if you want your wallpaper to scroll
-along when the user swipes from one home screen to another, you can use <a href="../../../reference/android/service/wallpaper/WallpaperService.Engine.html#onOffsetsChanged%28float,%20float,%20float,%20float,%20int,%20int%29"><code>onOffsetsChanged()</code></a>.
-To react to touch events, simply implement <a href="../../../reference/android/service/wallpaper/WallpaperService.Engine.html#onTouchEvent%28android.view.MotionEvent%29"><code>onTouchEvent(MotionEvent)</code></a>.
+along when the user swipes from one home screen to another, you can use
+{@link android.service.wallpaper.WallpaperService.Engine#onOffsetsChanged
+onOffsetsChanged()}.
+To react to touch events, simply implement {@link
+android.service.wallpaper.WallpaperService.Engine#onTouchEvent onTouchEvent()}.
Finally, applications can send arbitrary commands to the live wallpaper.
-Currently, only the standard home application sends commands to the <a
-href="../../../reference/android/service/wallpaper/WallpaperService.Engine.html#onCommand%28java.lang.String,%20int,%20int,%20int,%20android.os.Bundle,%20boolean%29"><code>onCommand()</code></a>
+Currently, only the standard home application sends commands to the
+{@link android.service.wallpaper.WallpaperService.Engine#onCommand onCommand()}
method of the live wallpaper:</p>
<ul>
@@ -78,9 +79,9 @@
<ul>
<li><code><uses-sdk android:minSdkVersion="7" /></code>, which indicates
to Android Market and the platform that your application requires Android 2.1 or
-higher. For more information, see the <a href="../../../guide/appendix/api-levels.html">API
+higher. For more information, see the <a href="{@docRoot}guide/appendix/api-levels.html">API
Levels</a> and the documentation for the
-<a href="../../../guide/topics/manifest/uses-sdk-element.html"><code><uses-sdk></code></a>
+<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code><uses-sdk></code></a>
element.</li>
<li><code><uses-feature android:name="android.software.live_wallpaper" /></code>,
which tells Android Market that your application includes a live wallpaper
@@ -89,7 +90,9 @@
displays your application only to users whose devices support live wallpapers,
while hiding it from other devices on which it would not be able to run. For
more information, see the documentation for the
-<a href="../../../guide/topics/manifest/uses-feature-element.html"><code><uses-feature></code></a>
+<a
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
+<uses-feature></a>
element.</li>
</ul>
diff --git a/docs/html/sdk/android-3.0.jd b/docs/html/sdk/android-3.0.jd
index 136bcd9..c9738bc 100644
--- a/docs/html/sdk/android-3.0.jd
+++ b/docs/html/sdk/android-3.0.jd
@@ -353,8 +353,8 @@
<p>For more information, read the <a
href="{@docRoot}guide/topics/providers/loaders.html">Loaders</a> documentation. You can also see
example code using loaders in the <a
-href="{@docRoot}samples/ApiDemos/src/com/example/android/apis/app/FragmentListCursorLoader.html">
-FragmentListCursorLoader</a> and <a
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentListCursorLoader.html">FragmentListCursorLoader</a>
+and <a
href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.html">
LoaderThrottle</a> samples.</p>
diff --git a/docs/html/sdk/preview/start.jd b/docs/html/sdk/preview/start.jd
index 3bf70b3..d6e442e 100644
--- a/docs/html/sdk/preview/start.jd
+++ b/docs/html/sdk/preview/start.jd
@@ -46,7 +46,7 @@
the samples are located in <code><sdk_root>/samples/android-Honeycomb</code>. The list of links
below helps you find samples for the features you are interested in:</p>
<ul>
- <li><a href="{@docRoot}resources/samples/Honeycomb-Gallery/index.html">Honeycomb Gallery</a> -
+ <li><a href="{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a> -
A demo application highlighting how to use some of the new APIs in Honeycomb, including fragments, the action bar,
drag and drop, transition animations, and a stack widget.</li>
<li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#Fragment">Fragments</a>