Google Home app (GHA) 是用智慧型裝置將智慧型裝置連線到 Google Assistant and assign them to structures and rooms in Google Home Graph . To perform setup, users typically click through multiple screens to find your smart home Action from a list of available options. By making it easier for users to begin the setup process, you can help onboard them more quickly and reduce user setup frustration. 的主要方式
為了簡化使用者在 smart home 裝置上的新手上路流程,Google smart home 平台提供多項便利功能,讓使用者能迅速進入設定流程,開始使用他們的 smart home 裝置。 這些功能很容易整合至你的「smart home」動作,你不用另外費心撰寫程式碼,就能輕鬆完成。
以下清單列出了在為 Assistant 設定智慧型裝置時,您可以實作的平台功能,以減少使用者操作不便的情形:
- App Discovery :使用者可透過這項功能,查看連結至 GHA 動作的動作建議方塊;使用者只要按一下方塊,就能透過自己的第三方供應商帳戶將自己的 smart home 裝置連結到 Assistant。
- 深層連結:這項功能可讓您在應用程式或產品網站中嵌入深層連結,讓使用者輕鬆將 smart home 裝置連結到 Assistant。 按一下連結,提示使用者下載 GHA (如果尚未安裝),並啟動帳戶連結和聊天室指派設定流程。
導入應用程式探索
您可以前往 Actions on Google Console after completing the Brand Verification process. No code changes are needed, however your smart home Action must already be reviewed and in production. 啟用 App Discovery 功能
登入 Actions Console
- 開啟「smart home」動作專案。
- 依序點選 [部署] > [品牌驗證]。
- 請按照下列步驟將公司網站連結至您的 Actions 專案。
- 在「網站」面板中,按一下 [連結網站]。
- 輸入您要連結的網站網址,然後按一下 [連結]。 Google 會傳送電子郵件給網站擁有者,以確認網站關聯。
在「Android apps」(Android 應用程式) 面板中,按一下 [Connect app] 按鈕,然後按照畫面上的指示操作。
在同一個面板中,將已連結應用程式的「Enable app Discovery」(啟用應用程式探索) 選項切換為開啟。在動作經過審查及核准之前,這個選項會呈現灰色。
Google Home 深層連結
深層連結可讓您將使用者從 Android 或 iOS 應用程式直接導向 GHA 內的特定目的地,進而透過 Assistant 簡化裝置設定流程。
GHA 深層連結的語法如下:
https://madeby.google.com/home-app/?deeplink=destination
您的 Android 或 iOS 應用程式目前可以連結至 GHA 中的下列目的地:
目的地 | 說明 |
---|---|
setup/ha_linking?agent_id=agent-id
|
針對指定的 smart home
動作,
啟動 OAuth 帳戶連結流程
agent-id
|
目的地路徑必須正確經過網址編碼,才能套用至深層連結。例如:
https://madeby.google.com/home-app/?deeplink=setup%2Fha_linking%3Fagent_id%3Dagent-id
如要進一步瞭解如何從應用程式內觸發深層連結,請參閱相關的 Android 說明文件和 iOS 說明文件。