Make a phone call within Google Assistant App
Asked Answered
C

1

7

I am trying to develop a Google Assistant App, primarily for Google Home and Google Assistant on the phone.

Is there a way to integrate Google's hands-free calling capability to the Assistant App, so that a user can directly initiate a phone call within my app?

For example. my app is providing a few suggestions for some stores, and will prompt the user to ask if they would like to make a call to a store.

Does anyone know if this is possible?

Many Thanks!

Curt answered 11/10, 2017 at 15:42 Comment(4)
As far as I know this is not supported right now. But I also wish this (and the ability to call other apps like navigation or text messaging and so forth) were available for us to use.Lucent
if we can make call by google assistant why not i can initiate call by an app made for google assistant using dialogflowLianeliang
Possible duplicate of Initiating a phone callHathcock
I want to do the same but i got errors, please help me show some code or any documentation. Open this link issues i am facing https://mcmap.net/q/1626819/-issue-in-make-a-phone-call-within-google-assistant-app/10744950Stearic
V
3

You can show a call button which will redirect to the specified number on the dialer app.

Here's a way to do that from fulfillment response:

"buttons": [
   {
    "title": "Call",
    "openUrlAction": {
        "url": "tel:+91123456789",
        "androidApp": {
            "packageName": "com.android.phone"
        },
        "versions": []
    }
  }
]

Add this JSON to your response and it will show a button which will redirect to default call app and shows +91123456789 number filled.

EXTRA

Similarly, if you want to send mail then you can add:

{
    "title": "Send Mail to Jay",
    "openUrlAction": {
        "url": "mailto:[email protected]",
        "androidApp": {
            "packageName": "android.intent.extra.EMAIL"
        },
        "versions": []
    }
}
Voluble answered 23/8, 2018 at 12:43 Comment(9)
I trying to add this button in a Basic Card but it does not show. Kindly help. ThanksTelemotor
Add one more empty object(for i.e. {}) in button array. and try itVoluble
I got it, is there a way to attach a Icon to that buttonTelemotor
also, is there documentation where this solution is taken from ? I would like to know more.Telemotor
You can refer developers.google.com/actions/reference/rest/Shared.Types/…Voluble
thanks Jay. problem I am facing is that card shows buttons in white circle. any suggestion on how to counter that ?Telemotor
I didn't get you.. buttons show in a white circle means? It seems that it's different problem itself, you can ask a new question, that would be helpful to others alsoVoluble
I got error when i tried above code please open this link #60597351Stearic
The above code is not working for google assistantStearic

© 2022 - 2024 — McMap. All rights reserved.