<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                > 編寫:[wly2014](https://github.com/wly2014) - 原文: [http://developer.android.com/training/wearables/data-layer/index.html](http://developer.android.com/training/wearables/data-layer/index.html) 可穿戴數據層API(The Wearable Data Layer API),Google Play services 的一部分,為你的手持與可穿戴應用提供了一個交流通道。此API包括一系列的數據對象,其可由系統通過網絡和能告知你應用數據層重要事件的監聽器發送并同步: **Data Items** 數據元提供了手持設備與可穿戴設備間的自動同步的數據儲存。 **Messages** MessageApi 類可以發送“自動跟蹤”命令消息,比如,從可穿戴設備上控制手持設備的媒體播放器,或在可穿戴設備上啟動一個來自手持設備的intent。當手持設備與可穿戴設備成功連接時,系統會發送該消息,否則,會發送一個錯誤。 **Asset** 資源對象是為了發送如圖像這樣的二進制數據。將資源附加到數據元,系統會自動負責傳遞,并通過緩存大的資源來避免重復傳送以保護藍牙帶寬。 **WearableListenerService (for services)** 拓展的 WearableListenerService 能夠監聽一個service中重要的數據層事件。系統控制WearableListenerService的生命周期,并當需要發送數據元或消息時,將其與service綁定,否則解除綁定。 **DataListener (for foreground activities)** 在一個前臺[activity](# "An activity represents a single screen with a user interface.")中實現DataListener能夠監聽重要的數據通道事件。只有當用戶頻繁地使用應用時,用此代替WearableListenerService來監聽改變。 > **Warning:** 因為這些Api是為手持設備與可穿戴設備間通信設計,所以你只能使用這些Api來建立這些設備間的通信。例如,不能試著打開底層sockets來創建通信通道。 ### Lessons - [Accessing the Wearable Data Layer(訪問可穿戴數據層)](#) 這節課向你展示了如何創建一個客戶端訪問數據層Api。 - [Syncing Data Items(同步數據單元)](#) 數據元是存儲在一個復制而來的數據倉庫中的對象,該倉庫可自動由手持設備同步到可穿戴設備。 - [Transferring Assets(傳輸資源)](#) 資源是典型地用來傳輸圖像和媒體二進制數據。 - [Sending and Receiving Messages(發送與接收消息)](#) 消息被設計為自動跟蹤的消息,可以在手持與可穿戴設備間來回傳送。 - [Handling Data Layer Events(處理數據層的事件)](#) 獲知數據層的變化與事件。
                  <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>

                              哎呀哎呀视频在线观看