Merge "docs: Fixed minor issues with Wear docs. Bug: 16062631" into klp-modular-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e34167cef7
@@ -89,10 +89,16 @@ types of screen shapes, which is useful for testing.</p>
|
||||
<li>Install the Android Wear app, available on Google Play, on your handheld.</li>
|
||||
<li>Follow the app's instructions to pair your handheld with your wearable.
|
||||
This allows you to test out synced handheld notifications, if you're building them.</li>
|
||||
<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.</li>
|
||||
as you develop. A message appears on both the wearable and the Android Wear app prompting you to allow debugging.</li>
|
||||
<li>On the Android Wear app, check <strong>Always allow from this computer</strong> and tap
|
||||
<strong>OK</strong>.</li>
|
||||
</ol>
|
||||
|
||||
<p>The <strong>Android</strong> tool window on Android Studio shows the system log from the wearable.
|
||||
The wearable should also be listed when you run the <code>adb devices</code> command.</p>
|
||||
|
||||
<h2 id="CreateProject">Create a Project</h2>
|
||||
|
||||
<p>To begin development, create an app project that contains
|
||||
|
||||
@@ -33,7 +33,7 @@ A minimal <a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleA
|
||||
|
||||
<p class="note"><b>Note:</b> For now, this minimal client is enough to get started. However, see
|
||||
<a href="{@docRoot}google/auth/api-client.html">Accessing Google Play services APIs</a>
|
||||
for more information about creating a<a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.html"><code>GoogleApiClient</code></a>,
|
||||
for more information about creating a <a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.html"><code>GoogleApiClient</code></a>,
|
||||
implementing its callbacks, and handling error cases.</p>
|
||||
|
||||
<pre style="clear:right">
|
||||
@@ -42,6 +42,7 @@ GoogleApiClient mGoogleAppiClient = new GoogleApiClient.Builder(this)
|
||||
@Override
|
||||
public void onConnected(Bundle connectionHint) {
|
||||
Log.d(TAG, "onConnected: " + connectionHint);
|
||||
// Now you can use the data layer API
|
||||
}
|
||||
@Override
|
||||
public void onConnectionSuspended(int cause) {
|
||||
@@ -56,4 +57,11 @@ GoogleApiClient mGoogleAppiClient = new GoogleApiClient.Builder(this)
|
||||
})
|
||||
.addApi(Wearable.API)
|
||||
.build();
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
<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>
|
||||
Reference in New Issue
Block a user