summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLuan Nguyen <luann@google.com>2014-11-07 00:05:20 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-07 00:05:20 +0000
commit816b93cf23c59a8a17e998ca706619b9eaa23793 (patch)
tree8eda5a8fffaa0e5b5b2ae9d8ef96777bd75b420b /docs
parentd00ce6c537242d8bf6f01122f7faebfc07652e87 (diff)
parent712c7ea3d87be2afb7ecaf0d87ea9f9eb1a0007c (diff)
downloadframeworks_base-816b93cf23c59a8a17e998ca706619b9eaa23793.zip
frameworks_base-816b93cf23c59a8a17e998ca706619b9eaa23793.tar.gz
frameworks_base-816b93cf23c59a8a17e998ca706619b9eaa23793.tar.bz2
am 712c7ea3: Merge "cherrypick from klp-modular-docs docs: make fixes to Wear training material Change-Id: I27c2c754a027f7202a6388a60008ad3a594132c4" into lmp-docs
* commit '712c7ea3d87be2afb7ecaf0d87ea9f9eb1a0007c': cherrypick from klp-modular-docs docs: make fixes to Wear training material Change-Id: I27c2c754a027f7202a6388a60008ad3a594132c4
Diffstat (limited to 'docs')
-rw-r--r--docs/html/training/wearables/apps/bt-debugging.jd4
-rw-r--r--docs/html/training/wearables/apps/creating.jd5
-rw-r--r--docs/html/training/wearables/apps/index.jd2
-rw-r--r--docs/html/training/wearables/data-layer/accessing.jd6
-rw-r--r--docs/html/training/wearables/data-layer/data-items.jd8
-rw-r--r--docs/html/training/wearables/data-layer/events.jd2
-rw-r--r--docs/html/training/wearables/data-layer/index.jd2
-rw-r--r--docs/html/training/wearables/data-layer/messages.jd4
-rw-r--r--docs/html/training/wearables/notifications/creating.jd17
-rw-r--r--docs/html/training/wearables/notifications/index.jd2
-rw-r--r--docs/html/training/wearables/notifications/stacks.jd2
-rw-r--r--docs/html/training/wearables/notifications/voice-input.jd6
12 files changed, 24 insertions, 36 deletions
diff --git a/docs/html/training/wearables/apps/bt-debugging.jd b/docs/html/training/wearables/apps/bt-debugging.jd
index 98cf804..7569e7e 100644
--- a/docs/html/training/wearables/apps/bt-debugging.jd
+++ b/docs/html/training/wearables/apps/bt-debugging.jd
@@ -19,7 +19,7 @@ page.title=Debugging over Bluetooth
</div>
</div>
-<p>You can debug your wearable over Bluetooth by routing it's debug output to the
+<p>You can debug your wearable over Bluetooth by routing its debug output to the
handheld device that's connected to your development machine.</p>
<h2 id="SetupDevices">Setup Devices for Debugging</h2>
@@ -90,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/creating.jd b/docs/html/training/wearables/apps/creating.jd
index 7252ada..018d9f7 100644
--- a/docs/html/training/wearables/apps/creating.jd
+++ b/docs/html/training/wearables/apps/creating.jd
@@ -92,6 +92,11 @@ types of screen shapes, which is useful for testing.</p>
<li>Leave the Android Wear app open on your phone.</li>
<li>Connect the wearable to your machine through USB, so you can install apps directly to it
as you develop. A message appears on both the wearable and the Android Wear app prompting you to allow debugging.</li>
+ <p class="note"><strong>Note:</strong> If you can not connect your wearable to your machine via USB,
+ follow the directions on
+ <a href="{@docRoot}training/wearables/apps/bt-debugging.html">Debugging over
+ Bluetooth</a>.
+ </p>
<li>On the Android Wear app, check <strong>Always allow from this computer</strong> and tap
<strong>OK</strong>.</li>
</ol>
diff --git a/docs/html/training/wearables/apps/index.jd b/docs/html/training/wearables/apps/index.jd
index 256205b..4bdd6bf 100644
--- a/docs/html/training/wearables/apps/index.jd
+++ b/docs/html/training/wearables/apps/index.jd
@@ -64,7 +64,7 @@ in ADT. The rest of this training assumes you're using Android Studio.
<dd>Learn how to create and display custom layouts for notifications and
activities.</dd>
<dt><a href="{@docRoot}training/wearables/apps/voice.html">Adding Voice Capabilities</a></dt>
- <dd>Learn how to launch an activity with a voice actions and how to start the
+ <dd>Learn how to launch an activity with voice actions and how to start the
system speech recognizer app to obtain free-form voice input.</dd>
<dt><a href="{@docRoot}training/wearables/apps/packaging.html">Packaging Wearable Apps</a></dt>
<dd>Learn how to package a wearable app inside a
diff --git a/docs/html/training/wearables/data-layer/accessing.jd b/docs/html/training/wearables/data-layer/accessing.jd
index bffd4c8..b7ecf5b 100644
--- a/docs/html/training/wearables/data-layer/accessing.jd
+++ b/docs/html/training/wearables/data-layer/accessing.jd
@@ -12,9 +12,9 @@ page.title=Accessing the Wearable Data Layer
<h2>Dependencies and Prerequisites</h2>
<ol>
- <li><a href="{@docRoot}training/wearables/apps/environment.html">Creating
- Wearable Apps > Setting up Your Environment</a></li>
- <li><a href="{@docRoot}training/wearables/apps/creating.html">Creating
+ <li><a href="{@docRoot}training/wearables/apps/creating.html#SetupEmulator">Creating
+ Wearable Apps > Set Up an Android Wear Emulator or Device</a></li>
+ <li><a href="{@docRoot}training/wearables/apps/creating.html#CreateProject">Creating
Wearable Apps > Creating a Project</a></li>
</ol>
</div>
diff --git a/docs/html/training/wearables/data-layer/data-items.jd b/docs/html/training/wearables/data-layer/data-items.jd
index 63c32ea..f843bb6 100644
--- a/docs/html/training/wearables/data-layer/data-items.jd
+++ b/docs/html/training/wearables/data-layer/data-items.jd
@@ -47,14 +47,14 @@ directly. Instead, you:
<p>
However, instead of working with raw bytes using <a href="{@docRoot}reference/com/google/android/gms/wearable/PutDataRequest.html#setData(byte[])">setData()</a>,
-we recommend you <a href="#data-map">use a data map</a>, which exposes
+we recommend you <a href="#SyncData">use a data map</a>, which exposes
a data item in an easy-to-use {@link android.os.Bundle}-like interface.
</p>
<h2 id="SyncData">Sync Data with a Data Map</h2>
<p>
-When possible, use the <a href="{@docRoot}reference/com/google/android/gms/wearable/DataMap.html"><code>DataMap</code></a> class,
-which lets you work with data items in the form of an Android {@link android.os.Bundle},
+When possible, use the <a href="{@docRoot}reference/com/google/android/gms/wearable/DataMap.html"><code>DataMap</code></a> class.
+This approach lets you work with data items in the form of an Android {@link android.os.Bundle},
so object serialization and de-serialization is done for you, and you can manipulate data with key-value pairs.
</p>
@@ -120,5 +120,5 @@ public void onDataChanged(DataEventBuffer dataEvents) {
<p>
This is just a snippet that requires more implementation details. Learn about
how to implement a full listener service or activity in
-<a href="{@docRoot}training/wearables/data-layer/events.html">Listening for Data Layer Events</a>.
+<a href="{@docRoot}training/wearables/data-layer/events.html#Listen">Listening for Data Layer Events</a>.
</p> \ No newline at end of file
diff --git a/docs/html/training/wearables/data-layer/events.jd b/docs/html/training/wearables/data-layer/events.jd
index 9e8acbc..9196a2c 100644
--- a/docs/html/training/wearables/data-layer/events.jd
+++ b/docs/html/training/wearables/data-layer/events.jd
@@ -159,7 +159,7 @@ public class DataLayerListenerService extends WearableListenerService {
}
// Loop through the events and send a message
- / to the node that created the data item.
+ // to the node that created the data item.
for (DataEvent event : events) {
Uri uri = event.getDataItem().getUri();
diff --git a/docs/html/training/wearables/data-layer/index.jd b/docs/html/training/wearables/data-layer/index.jd
index 6ef3fc7..73d9ee5 100644
--- a/docs/html/training/wearables/data-layer/index.jd
+++ b/docs/html/training/wearables/data-layer/index.jd
@@ -83,5 +83,3 @@ channel.
<dt><a href="{@docRoot}training/wearables/data-layer/events.html">Handling Data Layer Events</a></dt>
<dd>Be notified of changes and events to the data layer.</dd>
</dl>
-
-</div> \ No newline at end of file
diff --git a/docs/html/training/wearables/data-layer/messages.jd b/docs/html/training/wearables/data-layer/messages.jd
index 71f1bb1..b3afacb 100644
--- a/docs/html/training/wearables/data-layer/messages.jd
+++ b/docs/html/training/wearables/data-layer/messages.jd
@@ -27,7 +27,7 @@ Messages are a one-way communication mechanism that's good for remote procedure
such as sending a message to the wearable
to start an activity. You can also use messages in request/response model
where one side of the connection sends a message, does some work,
-sends back a response message.</p>
+and sends back a response message.</p>
<h2 id="SendMessage">Send a Message</h2>
@@ -95,5 +95,5 @@ public void onMessageReceived(MessageEvent messageEvent) {
<p>
This is just a snippet that requires more implementation details. Learn about
how to implement a full listener service or activity in
-<a href="{@docRoot}training/wearables/data-layer/events.html">Listening for Data Layer Events</a>.
+<a href="{@docRoot}training/wearables/data-layer/events.html#Listen">Listening for Data Layer Events</a>.
</p> \ No newline at end of file
diff --git a/docs/html/training/wearables/notifications/creating.jd b/docs/html/training/wearables/notifications/creating.jd
index 84e3311..57ac36e 100644
--- a/docs/html/training/wearables/notifications/creating.jd
+++ b/docs/html/training/wearables/notifications/creating.jd
@@ -4,7 +4,6 @@ page.title=Creating a Notification
<div id="tb-wrapper">
<div id="tb">
-
<h2>This lesson teaches you to</h2>
<ol>
<li><a href="#Import">Import the Necessary Classes</a></li>
@@ -30,7 +29,6 @@ Notifications using {@link android.widget.RemoteViews} are stripped of custom
layouts and the wearable only displays the text and icons. However, you can create
<a href="{@docRoot}training/wearables/apps/layouts.html#CustomNotifications">create custom notifications</a>
that use custom card layouts by creating a wearable app that runs on the wearable device.</p>
-</div>
<h2 id="Import">Import the necessary classes</h2>
@@ -255,7 +253,7 @@ NotificationCompat.WearableExtender wearableExtender =
Notification notif = new NotificationCompat.Builder(mContext)
.setContentTitle("New mail from " + sender)
.setContentText(subject)
- .setSmallIcon(R.drawable.new_mail);
+ .setSmallIcon(R.drawable.new_mail)
.extend(wearableExtender)
.build();
</pre>
@@ -278,7 +276,7 @@ method, in the <code>res/drawable-hdpi</code> directory of your handheld app.</p
<p>If you ever need to read wearable-specific options at a later time, use the corresponding get
method for the option. This example calls the
{@link android.support.v4.app.NotificationCompat.WearableExtender#getHintHideIcon()} method to
-get whether or not this notification hides the icon:
+get whether or not this notification hides the icon:</p>
<pre>
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender(notif);
@@ -304,14 +302,3 @@ notificationManager.notify(notificationId, notif);
features from {@link android.support.v4.app.NotificationCompat.WearableExtender}
do not work, so make sure to use {@link android.support.v4.app.NotificationCompat}.
</p>
-
-<pre>
-NotificationCompat.WearableExtender wearableExtender =
- new NotificationCompat.WearableExtender(notif);
-boolean hintHideIcon = wearableExtender.getHintHideIcon();
- </pre>
-
-<p>The {@link android.support.v4.app.NotificationCompat.WearableExtender} APIs allow you to add
-additional pages to notifications, stack notifications, and more. Continue to the following lessons
-to learn about these features.
-</p>
diff --git a/docs/html/training/wearables/notifications/index.jd b/docs/html/training/wearables/notifications/index.jd
index a7b6733..2833dfa 100644
--- a/docs/html/training/wearables/notifications/index.jd
+++ b/docs/html/training/wearables/notifications/index.jd
@@ -49,5 +49,3 @@ swipes to the left.</dd>
<dd>Learn how to place all similar notifications from your app in a stack, allowing users to view
each notification individually without adding multiple cards to the card stream.</dd>
</dl>
-
-</div> \ No newline at end of file
diff --git a/docs/html/training/wearables/notifications/stacks.jd b/docs/html/training/wearables/notifications/stacks.jd
index 9a528a4..9e70e1b 100644
--- a/docs/html/training/wearables/notifications/stacks.jd
+++ b/docs/html/training/wearables/notifications/stacks.jd
@@ -87,7 +87,7 @@ notification and call {@link android.support.v4.app.NotificationCompat.Builder#s
on the summary notification.</p>
<p>This notification does not appear in your stack of notifications on the wearable, but
-appears as the only notification on the handheld device.</p>
+it appears as the only notification on the handheld device.</p>
<pre style="clear:right">
Bitmap largeIcon = BitmapFactory.decodeResource(getResources(),
diff --git a/docs/html/training/wearables/notifications/voice-input.jd b/docs/html/training/wearables/notifications/voice-input.jd
index 3ce1c80..5a49343 100644
--- a/docs/html/training/wearables/notifications/voice-input.jd
+++ b/docs/html/training/wearables/notifications/voice-input.jd
@@ -86,7 +86,7 @@ style="float:right;margin:0 0 20px 40px" />
{@link android.support.v4.app.RemoteInput}:</p>
<pre>
-public static final EXTRA_VOICE_REPLY = "extra_voice_reply";
+public static final String EXTRA_VOICE_REPLY = "extra_voice_reply";
...
String replyLabel = getResources().getString(R.string.reply_label);
String[] replyChoices = getResources().getStringArray(R.array.reply_choices);
@@ -116,7 +116,7 @@ PendingIntent replyPendingIntent =
// Create the reply action and add the remote input
NotificationCompat.Action action =
new NotificationCompat.Action.Builder(R.drawable.ic_reply_icon,
- getString(R.string.label, replyPendingIntent))
+ getString(R.string.label), replyPendingIntent)
.addRemoteInput(remoteInput)
.build();
@@ -171,4 +171,4 @@ private CharSequence getMessageText(Intent intent) {
}
return null;
}
-</pre> \ No newline at end of file
+</pre>