0

在Android 9上测试。如果在谷歌助手中查询“使用myApp获取当前余额”和“使用myApp获取储蓄余额”,可以捕获并识别账户名称“交易账户”和“储蓄账户”。

似乎不适用于自定义帐户名称,例如查询“使用 myApp 获取资金余额”。期望帐户名称“基金帐户”会被检索,但实际上返回的是“余额”。

正如本文所建议的,内置意图“actions.intent.GET_ACCOUNT” in App actions not called by user query "Check Balance in mybank",内联库存在文件 actions.xml 文件中用于定义自定义帐户名称,但仍然没运气。

这是actions.xml

<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright 2019 Google LLC
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     https://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  -->

<actions>

  <!-- This file describes the supported actions by this app -->

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

    
    <fulfillment urlTemplate="myApp://mobile.app{?accountName}">
     
      <parameter-mapping
        intentParameter="account.name"
        urlParameter="accountName" />
    </fulfillment>

    <!-- Define parameters with inventories here -->
    <parameter name="account.name">
      <entity-set-reference entitySetId="accountNameEntitySet" />
    </parameter>
  </action>

  <entity-set entitySetId="accountNameEntitySet">
    <!-- Provide an identifier per entity -->
    <entity
      name="fund"
      alternateName="@array/fund_synonyms"
      identifier="fund" />
    <entity
      name="member"
      alternateName="@array/member_synonyms"
      identifier="member" />
  </entity-set>

</actions>

如果有人能为我解决这个问题,我们将不胜感激。:)。还有一点需要注意:我的应用程序已经部署为游戏控制台中的草稿。

4

1 回答 1

0

This should be fixed now. Keep me posted, if you're still facing this issue.

于 2020-09-15T19:15:29.453 回答