微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Android TV 中的 Google 助理和应用操作问题

如何解决Android TV 中的 Google 助理和应用操作问题

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

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>

意图正常工作,但助手没有关闭

解决方法

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。