Google Actions/Dialogflow-打开已安装的应用程序 [英] Google Actions / Dialogflow - open installed application

查看:48
本文介绍了Google Actions/Dialogflow-打开已安装的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个连接到Dialogflow和Firebase的Google Actions应用程序.是否可以通过Dialogflow打开另一个Java应用程序(安装在设备上-例如Android)?我原以为深链接"native-android-application"会成为现实,但我什么也没找到.

I have a Google Actions application connected to Dialogflow and Firebase. Is there any way to open another Java application (installed on device - for ex. Android) from the Dialogflow? I was hoping that deep-link 'native-android-application' would be way to go, but I was not able to find anything.

总而言之,我正在考虑以下流程:

To summarise I'm thinking about following flow:

  1. 与"app ABC"对话(Google助手将初始化google action应用)
  2. 发送1(将调用应用ABC"中的发送功能)
  3. "app ABC"将返回深链接到本机android应用程序"native-android-application"(native-android-application://info?id =')
  4. 当用户单击返回的响应时,将打开本机Android应用程序
  1. Talk to 'app ABC' (Google assistant will initialise the google actions app)
  2. Send 1 (Send function in 'app ABC' will be invoked)
  3. 'app ABC' will return a deep-link to the native android application 'native-android-application' (native-android-application://info?id=')
  4. When user clicks on the returned response the native-android-application will be opened

推荐答案

它仍处于开发人员预览中(因此您可以对其进行测试,但仍无法公开发布),但是您可以使用

It is still in developer preview (so you can test it, but can't yet publish it publicly), but you can use the Android Link helper that is part of the Actions on Google API. You need to link the app in the Actions developer console and then you'll be able to something like this:

function androidLink (app) {
  app.askToDeepLink('Great! Looks like we can do that in the Android app.', 'Gizmos for Android',
    'example://gizmos', 'com.example.gizmos', 'handle this for you');

  // Results in prompt:
  // "Great! Looks like we can do that in the Android app."
  // "Can I send you to Gizmos for Android mobile app to handle this for you?"
}

这篇关于Google Actions/Dialogflow-打开已安装的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆