Search code examples
actions-on-google

DeepLink error (Actions on Google)


I'm trying to launch my Android app from Android Assistant, following this documentation: https://developers.google.com/actions/assistant/helpers#android_link

My intent callback looks like this (mostly copied from documentation sample code):

app.intent('launch activity', (conv, {any}) => {
    const options = {
      destination: 'MyApp',
      url: 'myschema://www.mysite.com/deep/link',
      package: 'com.mycompany.myapp',
      reason: 'launching activity',
    };
    conv.ask(new DeepLink(options));
});

But the simulator reports this error:

MalformedResponse expected_inputs[0].input_prompt.rich_initial_prompt: 'rich_response' must contain at least one item.

I've isolated the error to the conv.ask() call. Everything else in my app works. I checked the response in the simulator it seems to be successful because it included my app package, url...etc but the simulator is still unhappy.

I'm really new to DialogFlow and Actions on Google so any suggestions are much appreciated.

Thanks in advance...


Solution

  • Looks like we need to update our docs. You need to have at least a TTS as part of the response: conv.ask('Great! Looks like we can do that in the app.'); ... conv.ask(new DeepLink(options));

    Please take a look at our reference docs which has the correct logic: https://actions-on-google.github.io/actions-on-google-nodejs/classes/conversation_helper.deeplink.html