[英]What is the proper syntax for testing app actions via voice using google assistant?
我目前正在用Kotlin編寫一個Android應用程序,以測試Google提供的新的內置應用程序操作。 目前,請查看action.intent.GET_ACCOUNT。
我已經有Android Studio,我的Google助手和我的設備都連接到相同的開發者帳戶。 我還用相同的包裹名稱將草稿上傳到了Play商店。 我可以使應用程序動作與測試工具一起運行,但是無法使用Google Assistant通過語音調用它。
我也咨詢了此鏈接以尋求幫助,但運氣不好的Android App Actions無法與語音命令配合使用
我對Google Assistant所說的是“嘿Google用Big Money查看我的帳戶”。 但是,我得到的只是一個在線搜索結果。 有什么明顯的我想念的東西嗎? 謝謝!
我的清單:
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data android:name="com.google.android.actions" android:resource="@xml/actions" />
<activity
android:name=".views.MainActivity"
android:exported="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:scheme="http"
android:host="martymoneybank.com"
android:pathPattern="/account"/>
</intent-filter>
</activity>
</application>
我的Action.xml:
<actions>
<action intentName="actions.intent.GET_ACCOUNT" >
<fulfillment urlTemplate="http://martymoneybank.com/account{?accountType}">
<parameter-mapping
intentParameter="account.name"
urlParameter="accountType" />
</fulfillment>
</action>
測試工具:
這是針對這種情況的常規故障排除步驟。 如果它通過Studio測試工具工作,但不能通過語音工作,則存在兩個潛在問題:
您使用了錯誤的(或不受支持的)短語,即Assistant無法與App Action匹配。 要查找示例查詢,請轉到此處 ,找到助手意圖,然后查看示例查詢。 例如。
但是,根據您的情況, GET_ACCOUNT
沒有任何示例查詢,因此請在此處提交錯誤。
這是助手方面的錯誤。 如果您嘗試使用示例查詢,但仍然無法正常運行(但通過Studio測試工具可以正常運行),請提出問題 。
就是說,對於GET_ACCOUNT
,您可以嘗試看看這些階段是否有效(還要注意,如果Assistant在記錄您所說的內容時遇到任何問題,當然沒有“嘿Google”,您也可以使用鍵盤輸入短語) :
嘿Google,使用Big Money獲取儲蓄帳戶余額
要么
嘿Google,在Big Money上查看我的儲蓄帳戶余額
要么
嘿,谷歌,問大錢告訴我我的儲蓄帳戶余額
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.