Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 321e0302 authored by Ricardo Cervera's avatar Ricardo Cervera Committed by Ricardo Cervera-Navarro
Browse files

docs: Fix Wear docs issues.

Bug: 16624918
Bug: 16626217
Bug: 16626415
Bug: 16624384
Bug: 16623147

Change-Id: I774f19aded22562b891f9d2ccc35f0befb50f21c
parent 7af4e812
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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>
+2 −2
Original line number Diff line number Diff line
@@ -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;
+3 −3
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ 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>
+1 −1
Original line number Diff line number Diff line
@@ -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
+10 −2
Original line number Diff line number Diff line
@@ -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)