我有一个连接到 Dialogflow 和 Firebase 的 Google Actions 应用程序。有没有办法从 Dialogflow 打开另一个 Java 应用程序(安装在设备上 - 例如 Android)?我希望深层链接“native-android-application”是可行的,但我找不到任何东西。
总而言之,我正在考虑以下流程:
- 与“应用 ABC”对话(Google 助理将初始化 Google Actions 应用)
- 发送 1(将调用“应用程序 ABC”中的发送函数)
- “app ABC”将返回到原生 Android 应用程序“native-android-application”(native-android-application://info?id=') 的深层链接
- 当用户点击返回的响应时, native Android 应用程序将打开
最佳答案
它仍处于开发者预览版(因此您可以对其进行测试,但尚无法公开发布),但您可以使用 Android Link helper这是 Actions on Google API 的一部分。您需要在 Actions 开发者控制台中链接该应用程序,然后您将能够执行如下操作:
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?"
}
关于actions-on-google - Google Actions/Dialogflow - 打开已安装的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49811777/