简体   繁体   English

将Google Assistant与我的应用程序集成时出现问题

[英]Issues while Integrating Google assistant with my app

I am trying to integrate google assistant to my fitness app so that when the user says "Start my workout on xyz app" my app starts. 我正在尝试将Google Assistant集成到我的健身应用程序中,以便当用户说“在xyz应用程序上开始锻炼”时,我的应用程序启动。 I followed the video here : https://developers.google.com/actions/app/ 我在这里观看了视频: https : //developers.google.com/actions/app/

and added this to my manifest : 并将其添加到我的清单中:

<meta-data android:name="com.google.android.actions"
            android:resource="@xml/actions"/>

Then added these details to my actions.xml file : 然后将这些详细信息添加到我的actions.xml文件中:

<?xml version="1.0" encoding="utf-8"?>
<actions>
    <action intentName="actions.intent.START_EXERCISE">
        <fulfillment urlTemplate="https://xyz.in{?exercise}">
            <parameter-mapping
                intentParameter = "exercise.name"
                urlParameter = "exercise"
                />

        </fulfillment>
    </action>

</actions>

Still not getting desired results. 仍然没有得到理想的结果。 What am I doing wrong here. 我在这里做错了。

You should trigger the action using the App Actions Test Plugin in Android Studio: 您应该使用Android Studio中的App Actions测试插件来触发操作:

https://plugins.jetbrains.com/plugin/12322-app-actions-test-tool https://plugins.jetbrains.com/plugin/12322-app-actions-test-tool

Once you've installed the plugin, you'll find it under 'Tools' and you can define an invocation name for your app + parameters. 安装插件后,您可以在“工具”下找到它,然后可以为应用程序+参数定义调用名称。

From the on, you can trigger it saying "ok google, start my workout on xyz app" 从开始,您可以触发它说“好吧,谷歌,在xyz应用程序上开始锻炼”

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM