【问题标题】:Problem with google assistant and app actions in Android TVAndroid TV 中的谷歌助手和应用操作问题
【发布时间】:2021-05-01 01:22:27
【问题描述】:

我使用来自应用程序操作的自定义意图,在执行命令后,助手不会关闭,它会保持打开状态,但会保持打开状态,但焦点仍然在我们的应用程序上,要关闭助手,我需要按下主页按钮。

actions.xml:

<?xml version ="1.0" encoding ="utf-8"?>
<actions>
    <action
        intentName="custom.actions.intent.OPEN_APP_FEATURE"
        queryPatterns="@array/feature_queries">
        <parameter
            name="action"
            type="https://schema.org/Text" />
        <parameter
            name="text"
            type="https://schema.org/Text" />

        <fulfillment urlTemplate="https://safarov.page.link/open{?item_action,item_text}">
            <parameter-mapping
                intentParameter="action"
                urlParameter="item_action" />
            <parameter-mapping
                intentParameter="text"
                urlParameter="item_text" />
        </fulfillment>
    </action>
</actions>

AndroidManifest.xml:

<intent-filter
    android:autoVerify="true"
    tools:targetApi="m">
    <action android:name="android.intent.action.VIEW" />

    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

    <data
        android:host="safarov.page.link"
        android:scheme="https" />
</intent-filter>

Intent 正常运行,但助手没有关闭。

【问题讨论】:

    标签: android actions-on-google android-tv app-actions google-assistant


    【解决方案1】:

    Android TV 目前不支持应用操作。请继续关注更新。

    【讨论】:

    • Android TV 有什么更新吗? codelabs 应用操作示例不适用于 ATV。当我运行测试工具时,我看到一条错误消息,“您没有可以执行此操作的应用程序”。我正在运行 Android-R。我已经尝试了 actions.xml 和 shortcuts.xml 示例
    • 我不明白为什么这在 Android TV 中不可用。它会非常有用...在 Android TV 中启用此功能的路线图中是否有任何计划?
    猜你喜欢
    • 1970-01-01
    • 2018-11-03
    • 1970-01-01
    • 2018-07-13
    • 2019-04-30
    • 2017-11-30
    • 2021-03-03
    • 1970-01-01
    • 2016-02-16
    相关资源
    最近更新 更多