協助您建構與 Matter devices, Google has developed the Google Home Mobile SDK . The Mobile SDK includes two core APIs that allow your apps to to commission and share devices with the Google fabric. 互動的 Android 應用程式。
將裝置加入 Google 織布後,使用者就能透過 Google Home app (GHA) , Android power controls, voice, and Nest touch screen devices. 控制自己的裝置
Mobile SDK 也可讓您定義自訂佣金服務,以便用來為其他 Matter 生態系統進行裝置委任。
將 Mobile SDK 整合到您的 Android 應用程式中
如要開始使用,請完成下列步驟:
請按照設定 Google Play services 一文提供的說明操作。
在
build.gradle
檔案中新增 Play services 依附元件:implementation 'com.google.android.gms:play-services-home:16.0.0-beta1'
使用 Matter 的 Google Home 範例應用程式
如要瞭解 Mobile SDK 如何在 Android 應用程式中運作,請試試我們的 Google Home Sample App for Matter .
打造自己的應用程式
為了協助您快速上手,我們開放 Sample App for Matter 的原始碼並提供隨附程式碼研究室,讓您針對自己的 Android 專案自訂程式碼範例。
前往 Sample App for Matter 程式碼研究室
資源
如要進一步瞭解 Mobile SDK,請參閱 API 參考資料。
如要瞭解此 SDK 如何處理使用者資料,請參閱 Home Mobile SDK 的 Google Play 資料安全性專區