[英]What is the proper syntax for testing app actions via voice using google assistant?
I am currently writing an Android app in Kotlin to test out the new built in app actions provided by Google. 我目前正在用Kotlin编写一个Android应用程序,以测试Google提供的新的内置应用程序操作。 At the moment, looking at actions.intent.GET_ACCOUNT.
目前,请查看action.intent.GET_ACCOUNT。
I already have Android Studio, my google assistant and my device all connected with the same developer account. 我已经有Android Studio,我的Google助手和我的设备都连接到相同的开发者帐户。 I have also uploaded a draft onto the play store with the same package name.
我还用相同的包裹名称将草稿上传到了Play商店。 I am able to get the app action to run with the test tool but not able to invoke it via voice using Google Assistant.
我可以使应用程序动作与测试工具一起运行,但是无法使用Google Assistant通过语音调用它。
I have also consulted this link for help but no luck Android App Actions does not work with voice command 我也咨询了此链接以寻求帮助,但运气不好的Android App Actions无法与语音命令配合使用
What I am saying into Google Assistant is something along the lines of "Hey Google view my account with Big Money". 我对Google Assistant所说的是“嘿Google用Big Money查看我的帐户”。 However, all I get is an online search result.
但是,我得到的只是一个在线搜索结果。 Is there something obvious that I am missing?
有什么明显的我想念的东西吗? Thanks!
谢谢!
My Manifest: 我的清单:
<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>
My Action.xml: 我的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>
Test Tool: 测试工具:
Here are the general troubleshooting steps for this kind of situation. 这是针对这种情况的常规故障排除步骤。 If it works via the Studio Test Tool, but it doesn't work via voice, then there's two potential issues:
如果它通过Studio测试工具工作,但不能通过语音工作,则存在两个潜在问题:
You are using the wrong (or an unsupported) phrase that Assistant cannot match to the App Action. 您使用了错误的(或不受支持的)短语,即Assistant无法与App Action匹配。 To find example queries, go here , find the Assistant intent and look at the example queries.
要查找示例查询,请转到此处 ,找到助手意图,然后查看示例查询。 Eg.
例如。
However, in your case, GET_ACCOUNT
does not have any example queries so please file a bug for this here . 但是,根据您的情况,
GET_ACCOUNT
没有任何示例查询,因此请在此处提交错误。
It's a bug on the Assistant side. 这是助手方面的错误。 If you try the example queries and it still doesn't work (but it works fine via the Studio Test Tool), then please file an issue .
如果您尝试使用示例查询,但仍然无法正常运行(但通过Studio测试工具可以正常运行),请提出问题 。
That said, for GET_ACCOUNT
could you try and see if these phases work (its also worth noting that you can use the keyboard to enter the phrases if Assistant is having any issues transcribing what you are saying, of course without the "hey google"): 就是说,对于
GET_ACCOUNT
,您可以尝试看看这些阶段是否有效(还要注意,如果Assistant在记录您所说的内容时遇到任何问题,当然没有“嘿Google”,您也可以使用键盘输入短语) :
hey google, get savings account balance using Big Money
嘿Google,使用Big Money获取储蓄帐户余额
or 要么
hey google, check my savings account balance on Big Money
嘿Google,在Big Money上查看我的储蓄帐户余额
or 要么
hey google, ask Big Money to tell me my savings account balance
嘿,谷歌,问大钱告诉我我的储蓄帐户余额
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.