diff --git a/docs/html/google/auth/api-client.jd b/docs/html/google/auth/api-client.jd index 5331d1ed9ab01..a0836d1dbd75c 100644 --- a/docs/html/google/auth/api-client.jd +++ b/docs/html/google/auth/api-client.jd @@ -15,6 +15,7 @@ startpage=true
However, before you can begin a connection by calling +Important: To avoid client connection errors on devices that do not have the +Android +Wear app installed, use a separate {@code +GoogleApiClient} instance to access only the {@code +Wearable} API. For more information, see Access the Wearable +API.
+ +Before you can begin a connection by calling {@code connect()} on the {@code @@ -408,6 +419,45 @@ consult the corresponding documentation, such as for
+On devices that do not have the Android
+Wear app installed, connection requests that include the {@code
+Wearable} API fail with the
+API_UNAVAILABLE error code. If your app uses the {@code
+Wearable} API in addition to other Google APIs, use a separate {@code
+GoogleApiClient} instance to access the {@code
+Wearable} API. This approach enables you to access other Google APIs on devices that are not
+paired with a wearable device.
When you use a separate {@code +GoogleApiClient} instance to access only the Wearable API, you can determine +whether the Android +Wear app is installed on the device:
+ +
+// Connection failed listener method for a client that only
+// requests access to the Wearable API
+@Override
+public void onConnectionFailed(ConnectionResult result) {
+ if (result.getErrorCode() == ConnectionResult.API_UNAVAILABLE) {
+ // The Android Wear app is not installed
+ }
+ ...
+}
+
+
+
+
+
+Important: To avoid client connection errors on devices that do not have the +Android +Wear app installed, use a separate {@code +GoogleApiClient} instance to access only the {@code +Wearable} API. For more information, see Access the Wearable API.
+Before you use the data layer API, start a connection on your client by calling the connect() method, as described in