summaryrefslogtreecommitdiffstats
path: root/docs/html/training
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/training')
-rw-r--r--docs/html/training/articles/security-ssl.jd35
-rw-r--r--docs/html/training/basics/firstapp/building-ui.jd2
-rw-r--r--docs/html/training/basics/firstapp/creating-project.jd2
-rw-r--r--docs/html/training/basics/firstapp/starting-activity.jd2
-rw-r--r--docs/html/training/material/animations.jd8
-rw-r--r--docs/html/training/tv/discovery/index.jd3
-rw-r--r--docs/html/training/tv/games/index.jd30
-rw-r--r--docs/html/training/tv/index.jd7
-rw-r--r--docs/html/training/tv/playback/index.jd2
-rw-r--r--docs/html/training/tv/start/hardware.jd77
-rw-r--r--docs/html/training/tv/start/index.jd1
-rw-r--r--docs/html/training/tv/start/start.jd79
-rw-r--r--docs/html/training/tv/tif/index.jd2
-rw-r--r--docs/html/training/wearables/apps/bt-debugging.jd5
-rw-r--r--docs/html/training/wearables/apps/layouts.jd12
-rw-r--r--docs/html/training/wearables/data-layer/accessing.jd15
-rw-r--r--docs/html/training/wearables/data-layer/index.jd2
-rw-r--r--docs/html/training/wearables/notifications/pages.jd13
-rw-r--r--docs/html/training/wearables/notifications/voice-input.jd9
19 files changed, 232 insertions, 74 deletions
diff --git a/docs/html/training/articles/security-ssl.jd b/docs/html/training/articles/security-ssl.jd
index 0639fb0..7f43d9c 100644
--- a/docs/html/training/articles/security-ssl.jd
+++ b/docs/html/training/articles/security-ssl.jd
@@ -22,6 +22,7 @@ page.article=true
<li><a href="#Blacklisting">Blacklisting</a></li>
<li><a href="#Pinning">Pinning</a></li>
<li><a href="#ClientCert">Client Certificates</a></li>
+ <li><a href="#nogotofail">Nogotofail: Network Security Testing</a></li>
</ol>
@@ -511,8 +512,42 @@ See the discussion about creating a custom {@link javax.net.ssl.KeyManager} in t
+<h2 id="nogotofail">
+ Nogotofail: A Network Traffic Security Testing Tool
+</h2>
+<p>
+ Nogotofail is a tool gives you an easy way to confirm that your apps are safe
+ against known TLS/SSL vulnerabilities and misconfigurations. It's an
+ automated, powerful, and scalable tool for testing network security issues on
+ any device whose network traffic could be made to go through it. </p>
+ <p>Nogotofail is useful for three main use cases:
+</p>
+
+<ul>
+ <li>Finding bugs and vulnerabilities.
+ </li>
+
+ <li>Verifying fixes and watching for regressions.
+ </li>
+
+ <li>Understanding what applications and devices are generating what traffic.
+ </li>
+</ul>
+
+<p>
+ Nogotofail works for Android, iOS, Linux, Windows, Chrome OS, OSX, in fact
+ any device you use to connect to the Internet. There’s an easy-to-use client
+ to configure the settings and get notifications on Android and Linux, as well
+ as the attack engine itself which can be deployed as a router, VPN server, or
+ proxy.
+</p>
+
+<p>
+ You can access the tool at the <a href=
+ "https://github.com/google/nogotofail">Nogotofail open source project</a>.
+</p>
diff --git a/docs/html/training/basics/firstapp/building-ui.jd b/docs/html/training/basics/firstapp/building-ui.jd
index c082642..0430cdd 100644
--- a/docs/html/training/basics/firstapp/building-ui.jd
+++ b/docs/html/training/basics/firstapp/building-ui.jd
@@ -1,7 +1,7 @@
page.title=Building a Simple User Interface
trainingnavtop=true
-page.tags=ui, views, layouts, widgets, string resources
+page.tags=ui
helpoutsWidget=true
@jd:body
diff --git a/docs/html/training/basics/firstapp/creating-project.jd b/docs/html/training/basics/firstapp/creating-project.jd
index 418eb68..2e06103 100644
--- a/docs/html/training/basics/firstapp/creating-project.jd
+++ b/docs/html/training/basics/firstapp/creating-project.jd
@@ -1,6 +1,6 @@
page.title=Creating an Android Project
-page.tags=eclipse adt, sdk tools, project setup
+page.tags=project setup
helpoutsWidget=true
trainingnavtop=true
diff --git a/docs/html/training/basics/firstapp/starting-activity.jd b/docs/html/training/basics/firstapp/starting-activity.jd
index f9dcba4..71f66dd 100644
--- a/docs/html/training/basics/firstapp/starting-activity.jd
+++ b/docs/html/training/basics/firstapp/starting-activity.jd
@@ -4,7 +4,7 @@ parent.link=index.html
trainingnavtop=true
-page.tags=input events, intents, activity lifecycle
+page.tags=intents
helpoutsWidget=true
@jd:body
diff --git a/docs/html/training/material/animations.jd b/docs/html/training/material/animations.jd
index e8291b8..efc0ee3 100644
--- a/docs/html/training/material/animations.jd
+++ b/docs/html/training/material/animations.jd
@@ -84,12 +84,14 @@ int cx = (myView.getLeft() + myView.getRight()) / 2;
int cy = (myView.getTop() + myView.getBottom()) / 2;
// get the final radius for the clipping circle
-int finalRadius = myView.getWidth();
+int finalRadius = Math.max(myView.getWidth(), myView.getHeight());
-// create and start the animator for this view
-// (the start radius is zero)
+// create the animator for this view (the start radius is zero)
Animator anim =
ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
+
+// make the view visible and start the animation
+myView.setVisibility(View.VISIBLE);
anim.start();
</pre>
diff --git a/docs/html/training/tv/discovery/index.jd b/docs/html/training/tv/discovery/index.jd
index fbc8c9f..5849149 100644
--- a/docs/html/training/tv/discovery/index.jd
+++ b/docs/html/training/tv/discovery/index.jd
@@ -1,4 +1,5 @@
-page.title=Helping Users Find Content on TV
+page.title=Helping Users Find Your Content on TV
+page.tags="tv", "leanback"
startpage=true
diff --git a/docs/html/training/tv/games/index.jd b/docs/html/training/tv/games/index.jd
index 2f510a9..5276d7f 100644
--- a/docs/html/training/tv/games/index.jd
+++ b/docs/html/training/tv/games/index.jd
@@ -1,5 +1,7 @@
page.title=Building TV Games
-page.tags="controller"
+page.tags="tv", "games", "controller"
+page.image=images/games/game-controller-buttons_2x_crop.png
+page.metaDescription=How to bring your games to Android TV, including recommendations and examples.
page.article=true
@jd:body
@@ -180,7 +182,7 @@ href="{@docRoot}training/game-controllers/controller-input.html#button"
It includes a white controller on black background and a black controller on white background
(shown in figure 1), as a PNG file and an Adobe&reg; Illustrator&reg; file.</p>
-<img src="{@docRoot}images/games/game-controller-buttons_2x.png" width="700"
+<img itemprop="image" src="{@docRoot}images/games/game-controller-buttons_2x.png" width="700"
srcset="{@docRoot}images/games/game-controller-buttons_2x.png 2x,
{@docRoot}images/games/game-controller-buttons.png 1x" />
<p class="img-caption"><b>Figure 1.</b> Example controller instructions using the
@@ -194,22 +196,22 @@ It includes a white controller on black background and a black controller on whi
<p>There are a some special things games should include in the Android manifest.</p>
-<h3 id="Launcher">Show your game in the launcher</h3>
+<h3 id="Launcher">Show your game on the home screen</h3>
<p>
- The Android TV launcher home screen displays games in a separate row from regular apps.
- To make your game appear in the list of games, add the
- <a href="{@docRoot}guide/topics/manifest/meta-data-element.html"
- ><code>&lt;meta-data></code></a> tag in your app manifest with <code>android:name</code>
- set to <code>"isGame"</code> and <code>android:value</code>
- set to <code>"true"</code>. For example:
+ The Android TV home screen displays games in a separate row from regular apps.
+ To make your game appear in the list of games, set the
+ <a href="{@docRoot}guide/topics/manifest/application-element.html#isGame">
+ {@code android:isGame}</a> attribute to <code>"true"</code> in your app manifest's
+ <a href="{@docRoot}guide/topics/manifest/application-element.html"><code>&lt;application&gt;</code>
+ </a> tag. For example:
</p>
<pre class="fragment">
-&lt;application&gt;
- ...
- &lt;meta-data android:name="isGame" android:value="true" &gt;
- ...
-&lt;/application&gt;
+&lt;application
+ ...
+ android:isGame="true"
+ ...
+&gt;
</pre>
diff --git a/docs/html/training/tv/index.jd b/docs/html/training/tv/index.jd
index 56667a9..d52e1e8 100644
--- a/docs/html/training/tv/index.jd
+++ b/docs/html/training/tv/index.jd
@@ -1,8 +1,11 @@
page.title=Building Apps for TV
page.trainingcourse=true
-
+page.metaDescription=Starting point for building apps and games for Android TV, with guidelines, information, and examples.
+page.image=design/tv/images/focus.png
@jd:body
-<p>These classes teach you how to build apps for TV devices.</p> \ No newline at end of file
+<p>These classes teach you how to build apps for TV devices.</p>
+
+<p class="note"><strong>Note:</strong> For details on how to publish your TV apps in Google Play, see <a href="{docRoot}distribute/googleplay/tv.html">Distributing to Android TV</a>.</p> \ No newline at end of file
diff --git a/docs/html/training/tv/playback/index.jd b/docs/html/training/tv/playback/index.jd
index 118fc6c..09c3f24 100644
--- a/docs/html/training/tv/playback/index.jd
+++ b/docs/html/training/tv/playback/index.jd
@@ -1,5 +1,5 @@
page.title=Building TV Playback Apps
-page.tags="leanback"
+page.tags="tv","leanback"
startpage=true
diff --git a/docs/html/training/tv/start/hardware.jd b/docs/html/training/tv/start/hardware.jd
index 33d396b..fc52602 100644
--- a/docs/html/training/tv/start/hardware.jd
+++ b/docs/html/training/tv/start/hardware.jd
@@ -85,27 +85,27 @@ if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION)
</tr>
<tr>
<td>Touchscreen</td>
- <td>android.hardware.touchscreen</td>
+ <td>{@code android.hardware.touchscreen}</td>
</tr>
<tr>
<td>Telephony</td>
- <td>android.hardware.telephony</td>
+ <td>{@code android.hardware.telephony}</td>
</tr>
<tr>
<td>Camera</td>
- <td>android.hardware.camera</td>
+ <td>{@code android.hardware.camera}</td>
</tr>
<tr>
<td>Near Field Communications (NFC)</td>
- <td>android.hardware.nfc</td>
+ <td>{@code android.hardware.nfc}</td>
</tr>
<tr>
<td>GPS</td>
- <td>android.hardware.location.gps</td>
+ <td>{@code android.hardware.location.gps}</td>
</tr>
<tr>
<td>Microphone</td>
- <td>android.hardware.microphone</td>
+ <td>{@code android.hardware.microphone}</td>
</tr>
</table>
@@ -142,20 +142,17 @@ if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION)
android:required="false"/&gt;
</pre>
-<p class="caution">
- <strong>Caution:</strong> Declaring an unavailable hardware feature as required by setting its
- value to {@code true} in your app manifest prevents your app from being installed on TV
- devices or appearing in the Android TV home screen launcher.
+<p>
+ All apps intended for use on TV devices must declare that the touch screen feature is not required
+ as described in <a href="{@docRoot}training/tv/start/start.html#no-touchscreen">Get Started with
+ TV Apps</a>. If your app normally uses one or more of the features listed above, change the
+ {@code android:required} attribute setting to {@code false} for those features in your manifest.
</p>
<p class="caution">
- <strong>Caution:</strong> Some <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code uses-permission}</a> manifest declarations <em>imply hardware use</em>, which can also
- prevent your app from being installed and used on TV devices. For example, requesting the
- {@link android.Manifest.permission#RECORD_AUDIO} permission in your app implies the
- {@code android.hardware.microphone} hardware feature requirement. In which case, you must declare
- the microphone feature as not required ({@code android:required="false"}) in your app manifest.
- For a list of permission requests that imply a hardware feature requirement, see <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html#permissions-features">
- {@code uses-feature}</a> guide.
+ <strong>Caution:</strong> Declaring a hardware feature as required by setting its
+ value to {@code true} prevents your app from being installed on TV
+ devices or appearing in the Android TV home screen launcher.
</p>
<p>
@@ -172,6 +169,52 @@ if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION)
</p>
+<h3 id="hardware-permissions">Declaring permissions that imply hardware features</h3>
+
+<p>
+ Some <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code uses-permission}</a>
+ manifest declarations <em>imply hardware features</em>. This behavior means that requesting some
+ permissions in your app manifest can exclude your app from from being installed and used on TV
+ devices. The following commonly requested permissions create an implicit hardware feature
+ requirement:
+</p>
+
+<table>
+ <tr>
+ <th>Permission</th>
+ <th>Implied hardware feature</th>
+ </tr>
+ <tr>
+ <td>{@link android.Manifest.permission#RECORD_AUDIO}</td>
+ <td>{@code android.hardware.microphone}</td>
+ </tr>
+ <tr>
+ <td>{@link android.Manifest.permission#CAMERA}</td>
+ <td>{@code android.hardware.camera} <em>and</em> <br>
+ {@code android.hardware.camera.autofocus}</td>
+ </tr>
+ <tr>
+ <td>{@link android.Manifest.permission#ACCESS_COARSE_LOCATION}</td>
+ <td>{@code android.hardware.location} <em>and</em> <br>
+ {@code android.hardware.location.network}</td>
+ </tr>
+ <tr>
+ <td>{@link android.Manifest.permission#ACCESS_FINE_LOCATION}</td>
+ <td>{@code android.hardware.location} <em>and</em> <br>
+ {@code android.hardware.location.gps}</td>
+ </tr>
+</table>
+
+<p>
+ For a complete list of permission requests that imply a hardware feature requirement, see
+ <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html#permissions-features">{@code
+ uses-feature}</a> guide. If your app requests one of the features listed above, include a
+ <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code uses-feature}</a>
+ declaration in your manifest for the implied hardware feature that indicates it is not
+ required ({@code android:required="false"}).
+</p>
+
+
<h3 id="check-features">Checking for hardware features</h2>
<p>
diff --git a/docs/html/training/tv/start/index.jd b/docs/html/training/tv/start/index.jd
index ceefea1..fb478a8 100644
--- a/docs/html/training/tv/start/index.jd
+++ b/docs/html/training/tv/start/index.jd
@@ -1,4 +1,5 @@
page.title=Building TV Apps
+page.tags="tv", "leanback"
startpage=true
@jd:body
diff --git a/docs/html/training/tv/start/start.jd b/docs/html/training/tv/start/start.jd
index bebeedd..aab1a39 100644
--- a/docs/html/training/tv/start/start.jd
+++ b/docs/html/training/tv/start/start.jd
@@ -11,6 +11,7 @@ startpage=true
<h2>This lesson teaches you how to</h2>
<ol>
<li><a href="#dev-project">Setup a TV Project</a></li>
+ <li><a href="#tv-libraries">Add TV Support Libraries</a></li>
<li><a href="#build-it">Build TV Apps</a></li>
<li><a href="#run">Run TV Apps</a></li>
</ol>
@@ -86,21 +87,15 @@ startpage=true
<p>An application intended to run on TV devices must declare a launcher activity for TV
in its manifest using a {@link android.content.Intent#CATEGORY_LEANBACK_LAUNCHER} intent filter.
- This filter identifies your app as being enabled for TV, allowing it to be considered a TV app
- in Google Play. Declaring this intent also identifies which activity
+ This filter identifies your app as being enabled for TV, and is required for your app to be
+ considered a TV app in Google Play. Declaring this intent also identifies which activity
in your app to launch when a user selects its icon on the TV home screen.</p>
-<p class="caution">
- <strong>Caution:</strong> If you do not include the {@link android.content.Intent#CATEGORY_LEANBACK_LAUNCHER} intent filter in
- your app, it is not visible to users running the Google Play store on TV devices. Also, if your
- app does not have this filter when you load it onto a TV device using developer tools, the app
- does not appear in the TV user interface.
-</p>
-
<p>The following code snippet shows how to include this intent filter in your manifest:</p>
<pre>
-&lt;application&gt;
+&lt;application
+ android:banner="&#64;drawable/banner" &gt;
...
&lt;activity
android:name=&quot;com.example.android.MainActivity&quot;
@@ -131,6 +126,14 @@ startpage=true
launch on a TV device.
</p>
+<p class="caution">
+ <strong>Caution:</strong> If you do not include the
+ {@link android.content.Intent#CATEGORY_LEANBACK_LAUNCHER} intent filter in
+ your app, it is not visible to users running the Google Play store on TV devices. Also, if your
+ app does not have this filter when you load it onto a TV device using developer tools, the app
+ does not appear in the TV user interface.
+</p>
+
<p>
If you are modifying an existing app for use on TV, your app should not use the same
activity layout for TV that it does for phones and tablets. The user interface of your TV app (or
@@ -142,7 +145,61 @@ startpage=true
</p>
-<h3 id="tv-libraries">Add TV support libraries</h3>
+<h3 id="no-touchscreen">Declare touchscreen not required</h3>
+
+<p>
+ Applications that are intended to run on TV devices do not rely on touch screens for input. In
+ order to make this clear, the manifest of your TV app must declare that a the {@code
+ android.hardware.touchscreen} feature is not required. This setting identifies your app as being
+ able to work on a TV device, and is required for your app to be considered a TV app in Google
+ Play. The following code example shows how to include this manifest declaration:
+</p>
+
+<pre>
+&lt;manifest&gt;
+ <strong>&lt;uses-feature android:name="android.hardware.touchscreen"
+ android:required="false" /&gt;</strong>
+ ...
+&lt;/manifest&gt;
+</pre>
+
+<p class="caution">
+ <strong>Caution:</strong> You must declare that a touch screen is not required in your app
+ manifest, as shown this example code, or your app cannot appear in the Google Play store on TV
+ devices.
+</p>
+
+<h3 id="banner">Provide a home screen banner</h3>
+
+<p>
+ An application must provide a home screen banner if it includes a Leanback launcher intent
+ filter. The banner is the app launch point that appears on the home screen in the apps and
+ games rows. Desribe the banner in the manifest as follows:
+</p>
+
+<pre>
+&lt;application
+ ...
+ android:banner="&#64;drawable/banner" &gt;
+
+ ...
+&lt;/application&gt;
+</pre>
+
+<p>
+ Use the <a href="{@docRoot}guide/topics/manifest/application-element.html#banner">{@code android:banner}</a>
+ attribute with the <a href="{@docRoot}guide/topics/manifest/application.html"><code>&lt;application&gt;</code></a>
+ tag to supply a default banner for all application activities, or with the
+ <a href="{@docRoot}guide/topics/manifest/activity-element.html"><code>&lt;activity&gt;</code></a>
+ tag to supply a banner for a specific activity.
+</p>
+
+<p>
+ See <a href="{@docRoot}design/tv/patterns.html#banner">Banners</a> in the UI Patterns for TV
+ design guide.
+</p>
+
+<h2 id="tv-libraries">Add TV Support Libraries</h3>
<p>
The Android SDK includes support libraries that are intended for use with TV apps. These
diff --git a/docs/html/training/tv/tif/index.jd b/docs/html/training/tv/tif/index.jd
index 4746e42..cde8ba7 100644
--- a/docs/html/training/tv/tif/index.jd
+++ b/docs/html/training/tv/tif/index.jd
@@ -1,5 +1,5 @@
page.title=Building Live TV Apps
-page.tags=tif
+page.tags="tv", "tif"
page.article=true
@jd:body
diff --git a/docs/html/training/wearables/apps/bt-debugging.jd b/docs/html/training/wearables/apps/bt-debugging.jd
index 036f24e..7569e7e 100644
--- a/docs/html/training/wearables/apps/bt-debugging.jd
+++ b/docs/html/training/wearables/apps/bt-debugging.jd
@@ -58,7 +58,8 @@ Target: connected
</li>
<li>Connect the handheld to your machine over USB and run:
<pre>
-adb forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444
+adb forward tcp:4444 localabstract:/adb-hub
+adb connect localhost:4444
</pre>
<p class="note"><b>Note</b>: You can use any available port that you have access to.</p>
@@ -89,4 +90,4 @@ adb -e &lt;command&gt;
adb -e logcat
adb -e shell
adb -e bugreport
-</pre> \ No newline at end of file
+</pre>
diff --git a/docs/html/training/wearables/apps/layouts.jd b/docs/html/training/wearables/apps/layouts.jd
index e62d3e5..a35acb0 100644
--- a/docs/html/training/wearables/apps/layouts.jd
+++ b/docs/html/training/wearables/apps/layouts.jd
@@ -90,9 +90,10 @@ PendingIntent notificationPendingIntent = PendingIntent.getActivity(this, 0, not
</ol>
<h2 id="UiLibrary">Create Layouts with the Wearable UI Library</h2>
<p>
-There's an unofficial UI library that is automatically included when you create your wearable
-app with the Android Studio Project Wizard. You can also add the library to your <code>build.gradle</code>
+The Wearable UI Library is automatically included when you create your wearable
+app with the Android Studio Project Wizard. You can also add this library to your <code>build.gradle</code>
file with the following dependency declaration:
+</p>
<pre>
dependencies {
@@ -101,8 +102,11 @@ dependencies {
compile 'com.google.android.gms:play-services-wearable:+'
}
</pre>
-This library helps you build UIs that are designed for wearables. Here are some of the major classes:
-</p>
+
+<p>This library helps you build UIs that are designed for wearables. For more information, see
+<a href="{@docRoot}training/wearables/ui/index.html">Creating Custom UIs for Wear Devices</a>.</p>
+
+<p>Here are some of the major classes in the Wearable UI Library:</p>
<ul>
<li><code>BoxInsetLayout</code> - A FrameLayout that's aware of screen shape and can box its
diff --git a/docs/html/training/wearables/data-layer/accessing.jd b/docs/html/training/wearables/data-layer/accessing.jd
index f0ea759..b7ecf5b 100644
--- a/docs/html/training/wearables/data-layer/accessing.jd
+++ b/docs/html/training/wearables/data-layer/accessing.jd
@@ -37,7 +37,7 @@ for more information about creating a <a href="{@docRoot}reference/com/google/an
implementing its callbacks, and handling error cases.</p>
<pre style="clear:right">
-GoogleApiClient mGoogleAppiClient = new GoogleApiClient.Builder(this)
+GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(new ConnectionCallbacks() {
&#64;Override
public void onConnected(Bundle connectionHint) {
@@ -55,13 +55,24 @@ GoogleApiClient mGoogleAppiClient = new GoogleApiClient.Builder(this)
Log.d(TAG, "onConnectionFailed: " + result);
}
})
+ // Request access only to the Wearable API
.addApi(Wearable.API)
.build();
</pre>
+<p class="caution">
+<strong>Important:</strong> To avoid client connection errors on devices that do not have the
+<a href="https://play.google.com/store/apps/details?id=com.google.android.wearable.app&hl=en">Android
+Wear app</a> installed, use a separate <a
+href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.html">{@code
+GoogleApiClient}</a> instance to access only the <a
+href="{@docRoot}reference/com/google/android/gms/wearable/Wearable.html">{@code
+Wearable}</a> API. For more information, see <a
+href="{@docRoot}google/auth/api-client.html#WearableApi">Access the Wearable API</a>.</p>
+
<p>Before you use the data layer API, start a connection on your client by calling the
<a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.html#connect()">connect()</a>
method, as described in
<a href="{@docRoot}google/auth/api-client.html#Starting">Accessing Google Play services APIs</a>.
When the system invokes the <code>onConnected()</code> callback for your client, you're ready
-to use the data layer API.</p> \ No newline at end of file
+to use the data layer API.</p>
diff --git a/docs/html/training/wearables/data-layer/index.jd b/docs/html/training/wearables/data-layer/index.jd
index aafdcd8..73d9ee5 100644
--- a/docs/html/training/wearables/data-layer/index.jd
+++ b/docs/html/training/wearables/data-layer/index.jd
@@ -8,7 +8,7 @@ page.title=Sending and Syncing Data
<h2>Dependencies and prerequisites</h2>
<ul>
<li>Android 4.3 (API Level 18) or higher on the handset device</li>
- <li>The latest version of <a href="{@docRoot}google/play">Google Play services</a></li>
+ <li>The latest version of <a href="{@docRoot}google/play-services/index.html">Google Play services</a></li>
<li>An Android Wear device or Wear AVD</li>
</ul>
</div>
diff --git a/docs/html/training/wearables/notifications/pages.jd b/docs/html/training/wearables/notifications/pages.jd
index d74c8ea..6315037 100644
--- a/docs/html/training/wearables/notifications/pages.jd
+++ b/docs/html/training/wearables/notifications/pages.jd
@@ -57,15 +57,14 @@ Notification secondPageNotification =
.setStyle(secondPageStyle)
.build();
-// Add second page with wearable extender and extend the main notification
-Notification twoPageNotification =
- new WearableExtender()
- .addPage(secondPageNotification)
- .extend(notificationBuilder)
- .build();
+// Extend the notification builder with the second page
+Notification notification = notificationBuilder
+ .extend(new NotificationCompat.WearableExtender()
+ .addPage(secondPageNotification))
+ .build();
// Issue the notification
notificationManager =
NotificationManagerCompat.from(this);
-notificationManager.notify(notificationId, twoPageNotification);
+notificationManager.notify(notificationId, notification);
</pre> \ No newline at end of file
diff --git a/docs/html/training/wearables/notifications/voice-input.jd b/docs/html/training/wearables/notifications/voice-input.jd
index ac24682..5a49343 100644
--- a/docs/html/training/wearables/notifications/voice-input.jd
+++ b/docs/html/training/wearables/notifications/voice-input.jd
@@ -37,7 +37,7 @@ so you can type replies instead.</p>
<h2 id="VoiceInput">Define the Voice Input</h2>
-<p>To create an action that supports voice input, create an instance of
+<p>To create an action that supports voice input, create an instance of
{@link android.support.v4.app.RemoteInput.Builder} that you can add to your notification action.
This class's constructor accepts a string that the system uses as
the key for the voice input, which you'll later use to retrieve the text of the
@@ -166,10 +166,9 @@ which is referenced by the <code>EXTRA_VOICE_REPLY</code> key that is used in th
private CharSequence getMessageText(Intent intent) {
Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
- if (remoteInput != null) {
- return remoteInput.getCharSequence(EXTRA_VOICE_REPLY);
- }
+ if (remoteInput != null) {
+ return remoteInput.getCharSequence(EXTRA_VOICE_REPLY);
}
return null;
}
-</pre> \ No newline at end of file
+</pre>