diff options
| author | Luan Nguyen <luann@google.com> | 2015-04-22 14:48:46 -0700 |
|---|---|---|
| committer | Luan Nguyen <luann@google.com> | 2015-04-27 13:30:40 -0700 |
| commit | 47b7e060d98c337166114c5889f35224c6e10627 (patch) | |
| tree | 6cd455583ca42fc21043459e636a360b6b3a384c /docs/html/training | |
| parent | 8408cbe3adc8b0df4ae279a2e8689d1066972744 (diff) | |
| download | frameworks_base-47b7e060d98c337166114c5889f35224c6e10627.zip frameworks_base-47b7e060d98c337166114c5889f35224c6e10627.tar.gz frameworks_base-47b7e060d98c337166114c5889f35224c6e10627.tar.bz2 | |
docs: Update Wearable API setup to mention addApiIfAvailable().
bug: 20486912
Change-Id: Ie5fe89b5bd0bbed5c95cead301c6eb6278bfdaee
Diffstat (limited to 'docs/html/training')
| -rw-r--r-- | docs/html/training/wearables/data-layer/accessing.jd | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/html/training/wearables/data-layer/accessing.jd b/docs/html/training/wearables/data-layer/accessing.jd index 0c0a2d5..482b30c 100644 --- a/docs/html/training/wearables/data-layer/accessing.jd +++ b/docs/html/training/wearables/data-layer/accessing.jd @@ -61,13 +61,16 @@ GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) </pre> <p class="caution"> -<strong>Important:</strong> To avoid client connection errors on devices that do not have the +<strong>Important:</strong> If you are adding multiple APIs to a +<a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.html"><code>GoogleApiClient</code></a>, +you may run into 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 +Wear app</a> installed. To avoid connection errors, call the +<a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.Builder.html#addApiIfAvailable(com.google.android.gms.common.api.Api<? extends com.google.android.gms.common.api.Api.ApiOptions.NotRequiredOptions>, com.google.android.gms.common.api.Scope...)">{@code addApiIfAvailable()}</a> +method and pass in the <a href="{@docRoot}reference/com/google/android/gms/wearable/Wearable.html">{@code -Wearable}</a> API. For more information, see <a +Wearable}</a> API to indicate that your client should gracefully handle the missing 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 |
