Dialogflow 如何在没有语音确认的情况下通过 DeepLink 启动 Android 应用程序?

sri*_*nth 5 deep-linking actions-on-google dialogflow-es

我正在尝试使用 Android 应用程序内的 DeepLink,使用 Actions-on-google 的 Dialogflow 处理轮播项目选择。

代码是:

'use strict';

const dialogflow = require('actions-on-google').ActionsSdkApp;
const {
    dialogflow,
    DeepLink,
    Image,
    Carousel
} = require('actions-on-google');

const agent = dialogflow({
    debug: true,
});
agent.intent(INTENT_OPTION, (conv, input, option) => {
    console.log("carousel clicked input " + input + " option " + option);
    deepLink(conv, option);
});

function deepLink(conv, option) {
    // example url = 'examplescheme://www.someexample.in/content/id/110212';
    const options = {
        destination: 'Sample App',
        url: option,
        package: 'com.example.deeplink',
        reason: 'Launch App',
    };
    conv.ask('Great! looks like maybe we can do that in the app.');
    conv.ask(new DeepLink(options));
}
Run Code Online (Sandbox Code Playgroud)

但是,当我按照此操作时,轮播项目的标题会显示在屏幕上,并会收到一个带有所提供描述的提示对话框,以实际重定向到应用程序来处理该操作。

我观察到 Youtube 应用程序可以消除打印的标题和此提示对话框,并使用 DeepLink 直接启动应用程序。

这可以与其他应用程序一起使用吗?

提前致谢。