简体   繁体   English

OPEN_APP_FEATURE 操作无法通过语音命令运行 [通过应用程序操作测试工具完美运行]

[英]OPEN_APP_FEATURE action not working through voice command [Works perfactly via App Actions Test Tool]

I have implemented actions.intent.OPEN_APP_FEATURE in my app with SLICE provider.我已经在我的应用程序中使用 SLICE 提供程序实现了 actions.intent.OPEN_APP_FEATURE。
Here is how my actions.xml look likes.这是我的actions.xml的样子。

<action intentName="actions.intent.OPEN_APP_FEATURE">

        <fulfillment
            fulfillmentMode="actions.fulfillment.SLICE"
            urlTemplate="content://com.sa.actiondemo.slices.provider/{?featureName}">

            <parameter-mapping
                intentParameter="feature"
                required="true"
                urlParameter="featureName" />
        </fulfillment>

        <fulfillment
            fulfillmentMode="actions.fulfillment.DEEPLINK"
            urlTemplate="https://actiondemo.sa.com/{?featureName}">

            <parameter-mapping
                intentParameter="feature"
                urlParameter="featureName" />
        </fulfillment>

        <parameter name="feature">
            <entity-set-reference entitySetId="FeatureEntitySet" />
        </parameter>

</action> 

In the above code, FeatureEntitySet contains different features like Jog, Run, Dance, etc. which I want to open on my application and everything works perfectly via App Actions Test Tool.在上面的代码中, FeatureEntitySet包含不同的功能,如慢跑、跑步、舞蹈等,我想在我的应用程序上打开这些功能,并且一切都通过 App Actions Test Tool 完美运行。

While I creating preview on App Actions Test Tool it creates preview with default feature value History .当我在 App Actions Test Tool 上创建预览时,它会使用默认功能值History创建预览。 Now when I change feature value History with other value as mentioned above it works well on AATT , but while testing on my device with voice command or using input text it is not working.现在,当我将特征值History更改为上面提到的其他值时,它在AATT上运行良好,但是在我的设备上使用语音命令或使用输入文本进行测试时,它不起作用。

I want to add one more thing that the default feature value History of created preview works via voice command too but the other features from FeatureEntitySet not working.我想再添加一件事,即创建预览的默认特征值历史记录也可以通过语音命令工作,但FeatureEntitySet中的其他功能不起作用。

Does anyone has faced this issue or anyone have an idea how to resolve this issue?有没有人遇到过这个问题或有人知道如何解决这个问题?

I faced the same issue and it was due to my App Name.我遇到了同样的问题,这是由于我的应用程序名称。 Make sure your app name is unique enough and that Google Assistant spell it properly when you pronounce.确保您的应用名称足够独特,并且 Google 助理在您发音时拼写正确。 Also, make sure the feature you invoke match your feature entity set (or parameter-binding if you use the new shortcuts )此外,请确保您调用的功能与您的功能实体集匹配(或参数绑定,如果您使用新的快捷方式

Build and install your app on your test device.在您的测试设备上构建并安装您的应用程序。 Then in App Actions Test Tool, set the app name and click Create Preview.然后在应用操作测试工具中,设置应用名称并单击创建预览。

Then open Google Assistant app on your device and tap on the keyboard icon, and type your request: open <feature name> in <app name>然后在您的设备上打开 Google Assistant 应用并点击键盘图标,然后输入您的请求: open <feature name> in <app name>

If this works, the voice command should work too.如果这有效,语音命令也应该有效。 You can repeat the request by taping on the mic icon.您可以通过点击麦克风图标重复请求。 Double check that the spelling is correct when you speak to the assistant.当您与助手交谈时,请仔细检查拼写是否正确。

How does it works?它是如何工作的?

In the background Google Assistant recognise that the first word is "open" so it will look for an app name and a feature name, then check them against its database to see if this tuple match something on your phone.在后台,Google Assistant 识别出第一个单词是“open”,因此它会查找应用名称和功能名称,然后将它们与数据库进行检查,以查看该元组是否与您手机上的某些内容匹配。 this is why it is important that both the feature and the app name can be recognised properly.这就是为什么正确识别功能和应用程序名称很重要的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android Studio 中的 OPEN_APP_FEATURE 操作 - OPEN_APP_FEATURE Action in Android Studio 如何将OPEN_APP_FEATURE操作集成到Android应用程序中? - How to integrate the OPEN_APP_FEATURE action into an Android application? 为系统应用添加 OPEN_APP_FEATURE - Add OPEN_APP_FEATURE for system apps App Action 通过 App Action Tool Plugin 工作,但不能在 Google Assistant 屏幕中使用语音命令 - App Action working via App Action Tool Plugin but not with voice command in Google Assistant Screen App Action 适用于 App Actions 测试工具,但不适用于 Google Assistant - App Action Works on App Actions Test Tool But not On Google Assistant 应用程序操作:使用测试工具但不使用语音 - app actions: work with test tool but not with voice 在 Android 上,我无法让 actions.intent.OPEN_APP_FEATURE 在应用程序操作测试工具之外工作 - On Android, I cannot get actions.intent.OPEN_APP_FEATURE to work outside the App Actions Test Tool 应用操作未与应用操作测试工具一起运行 - App Action not running with App Actions Test Tool OPEN_APP_FEATURE 具有多种实现模式和不同的实体集? - OPEN_APP_FEATURE with multiple fulfillment modes and distinct entity-sets? 磨损:使用自定义语音启动命令打开我的应用程序,无法正常工作 - Wear: Open my app with custom voice Start command, not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM