miro
miro

Reputation: 809

Google Actions / Dialogflow - open installed 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. 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

Upvotes: 2

Views: 1957

Answers (1)

Prisoner
Prisoner

Reputation: 50701

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?"
}

Upvotes: 2

Related Questions