OSDN Git Service

docs: Fix Wear docs issues.
authorRicardo Cervera <rcervera@google.com>
Mon, 28 Jul 2014 17:50:32 +0000 (10:50 -0700)
committerRicardo Cervera-Navarro <rcervera@google.com>
Mon, 28 Jul 2014 17:52:40 +0000 (17:52 +0000)
Bug: 16624918
Bug: 16626217
Bug: 16626415
Bug: 16624384
Bug: 16623147

Change-Id: I774f19aded22562b891f9d2ccc35f0befb50f21c

docs/html/training/wearables/apps/creating.jd
docs/html/training/wearables/apps/voice.jd
docs/html/training/wearables/data-layer/events.jd
docs/html/training/wearables/data-layer/messages.jd
docs/html/training/wearables/notifications/creating.jd

index 09a90c8..7252ada 100644 (file)
@@ -112,7 +112,7 @@ Project</a>. As you follow the wizard, enter the following information:</p>
   name.</li>
   <li>In the <b>Form Factors</b> window:
     <ul>
-      <li>Select <b>Phone and Tablet</b> and select <b>API 8: Android 2.2 (Froyo)</b>
+      <li>Select <b>Phone and Tablet</b> and select <b>API 9: Android 2.3 (Gingerbread)</b>
       under <b>Minimum SDK</b>.</li>
       <li>Select <b>Wear</b> and select <b>API 20: Android 4.4 (KitKat Wear)</b>
       under <b>Minimum SDK</b>.</li>
index 639d90a..4aa8031 100644 (file)
@@ -119,7 +119,7 @@ named <code>MyNoteActivity</code>:
     <td>
       <dl>
         <dt>Action</dt>
-        <dd><code>android.provider.AlarmClock.ACTION_SET_TIMER</code></dd>
+        <dd><code>android.intent.action.SET_TIMER</code></dd>
         <dt>Extras</dt>
         <dd><code>android.provider.AlarmClock.EXTRA_LENGTH</code> - an integer in the range of
         1 to 86400 (number of seconds in 24 hours) representing the length of the timer </dd>
@@ -244,7 +244,7 @@ from users and then process it, such as doing a search or sending it as a messag
 
 In your app, you call {@link android.app.Activity#startActivityForResult startActivityForResult()} using
 the {@link android.speech.RecognizerIntent#ACTION_RECOGNIZE_SPEECH} action. This starts the
- and then handle the result
+speech recognition activity, and you can then handle the result
 in {@link android.app.Activity#onActivityResult onActivityResult()}.
 <pre>
 private static final int SPEECH_REQUEST_CODE = 0;
index a37afe0..9e8acbc 100644 (file)
@@ -102,12 +102,12 @@ so the handheld app doesn't listen for any data events from the wearable app.</p
 <ul>
   <li><a href="{@docRoot}reference/com/google/android/gms/wearable/WearableListenerService.html#onDataChanged(com.google.android.gms.wearable.DataEventBuffer)"><code>onDataChanged()</code></a>
 - Called when data item objects are created, changed, or deleted. An event on one side of a connection
-triggers an this callback on both sides.</li>
+triggers this callback on both sides.</li>
   <li><a href="{@docRoot}reference/com/google/android/gms/wearable/WearableListenerService.html#onMessageReceived(com.google.android.gms.wearable.MessageEvent)"><code>onMessageReceived()</code></a>
 -  A message sent from one side of a connection triggers this callback on the other side of the connection.</li>
   <li><a href="{@docRoot}reference/com/google/android/gms/wearable/WearableListenerService.html#onMessageReceived(com.google.android.gms.wearable.MessageEvent)"><code>onPeerConnected()</code></a>
   and <a href="{@docRoot}reference/com/google/android/gms/wearable/WearableListenerService.html#onPeerDisconnected(com.google.android.gms.wearable.Node)"><code>onPeerDisconnected()</code></a> -
-  Called when connection with the handheld or wearable is connected or disconnected. 
+  Called when connection with the handheld or wearable is connected or disconnected.
   Changes in connection state on one side of the connection triggers these callbacks on both sides of the connection.
   </li>
 </ul>
@@ -174,7 +174,7 @@ public class DataLayerListenerService extends WearableListenerService {
         }
     }
 }
-</pre>  
+</pre>
 
 <p>Here's the corresponding intent filter in the Android manifest file:</p>
 
index d0d5a0c..15e552d 100644 (file)
@@ -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="#listening">Listening for Data Layer Events</a>.
+<a href="{@docRoot}training/wearables/data-layer/events.html">Listening for Data Layer Events</a>.
 </p>
\ No newline at end of file
index a61fa07..08598c1 100644 (file)
@@ -33,7 +33,15 @@ that use custom card layouts by creating a wearable app that runs on the wearabl
 </div>
 
 <h2 id="Import">Import the necessary classes</h2>
-<p>Before you begin, import the necessary classes from the support library:</p>
+
+<p>To import the necessary packages, add this line to your <code>build.gradle</code>file:</p>
+
+<pre>
+compile "com.android.support:support-v4:20.0.+"
+</pre>
+
+<p>Now that your project has access to the necessary packages, import the necessary classes from
+the support library:</p>
 
 <pre style="clear:right">
 import android.support.v4.app.NotificationCompat;
@@ -190,7 +198,7 @@ bigStyle.bigText(eventDescription);
 NotificationCompat.Builder notificationBuilder =
         new NotificationCompat.Builder(this)
         .setSmallIcon(R.drawable.ic_event)
-        .setLargeIcon(BitmapFractory.decodeResource(
+        .setLargeIcon(BitmapFactory.decodeResource(
                 getResources(), R.drawable.notif_background))
         .setContentTitle(eventTitle)
         .setContentText(eventLocation)