Dialogflow how to DeepLink to launch Android app without the voice confirmation?
Asked Answered
M

0

6

I am trying to handle the carousel item selection using DeepLink inside the Android app, using Dialogflow of actions-on-google.

The code is:

'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));
}

But when I follow this, the title of carousel item is displayed on the screen and getting a prompt dialog with the provided description to actually redirect to the app to handle the action.

I observed the Youtube app that it is possible to eliminate the title printed & this prompt dialog and directly launch the app with a DeepLink.

Is this can be possible with other apps?

Thanks in advance.

Mccain answered 23/11, 2018 at 10:29 Comment(1)
I'm wondering about the same thing. Right now I can only think of using implicit intents to make it.Bioastronautics

© 2022 - 2024 — McMap. All rights reserved.