<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                > 編寫:[wly2014](https://github.com/wly2014) - 原文: [http://developer.android.com/training/wearables/data-layer/accessing.html](http://developer.android.com/training/wearables/data-layer/accessing.html) 調用數據層API,需創建一個 [GoogleApiClient](#) 實例,所有 Google Play services APIs的主要入口點。 [GoogleApiClient](#) 提供了一個易于創建客戶端實例的builder。最簡單的[GoogleApiClient](#)如下: > **Note:** 目前,此小client僅足以能啟動。但是,更多創建GoogleApiClient,實現回調方法和處理錯誤等內容,詳見 [Accessing Google Play services APIs](#)。 ~~~ GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(new ConnectionCallbacks() { @Override public void onConnected(Bundle connectionHint) { Log.d(TAG, "onConnected: " + connectionHint); // 現在你可以使用Data Layer API 了 } @Override public void onConnectionSuspended(int cause) { Log.d(TAG, "onConnectionSuspended: " + cause); } }) .addOnConnectionFailedListener(new OnConnectionFailedListener() { @Override public void onConnectionFailed(ConnectionResult result) { Log.d(TAG, "onConnectionFailed: " + result); } }) // 請求只訪問 Wearable API .addApi(Wearable.API) .build(); ~~~ > **Important:**為了避免在并沒有安裝 [Android Wear app ](https://play.google.com/store/apps/details?id=com.google.android.wearable.app&hl=en) 的設備上,客戶端連接失敗,請使用獨立的[GoogleApiClient](http://developer.android.com/reference/com/google/android/gms/common/api/GoogleApiClient.html) 實例來僅訪問 [Wearable](http://developer.android.com/reference/com/google/android/gms/wearable/Wearable.html) API。更多的信息,請參見 [Access the Wearable API](http://developer.android.com/google/auth/api-client.html#WearableApi). 在你使用數據層API之前,通過調用[connect()](#))方法進行連接,如 [Start a Connection](http://developer.android.com/google/auth/api-client.html#Starting)中所述。當系統為你的客戶端調用了[onConnected()](http://developer.android.com/reference/com/google/android/gms/common/api/GoogleApiClient.ConnectionCallbacks.html#onConnected(android.os.Bundle)) 方法,你就可以使用數據層API了。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看