发起电话 [英] Initiating a phone call

查看:66
本文介绍了发起电话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以拨打电话?例如。如果我正在执行分支查找程序操作,则对话框可能会像这样:

Is it possible yet to initiate a phone call? E.g. if I'm making a branch finder action a dialogue might go like:

"Hi, where's my nearest store?"
"Your nearest store is our Oxford Street branch, at 300 Oxford St, Marylebone."
"Call it"
"Sure"

然后发起呼叫商店,就像使用 ACTION_DIAL 意向的Android应用一样。

It then initiates a call to the store, like an Android app using an ACTION_DIAL intent.

我认为这样的应该是可能的,特别是考虑到目前支持Assistant的设备是电话和Google Home,两者都可以使呼叫(我想将来可能没有内置助手的设备,但是可能会有 app.phoneCapabilities 这样的检查)。我尝试使用 .addSuggestionLink tel:地址,但没有运气。

I would think something like this should be possible, especially considering the current devices supporting Assistant are phones and Google Home, both of which can make calls (I guess future devices with assistant built in might not, but then there can be a check like app.phoneCapabilities). I've tried using .addSuggestionLink with a tel: address with no luck.

推荐答案

如果有人回过头来并对它感兴趣,我实际上对此进行了躲闪的工作。

I actually made a dodgy work around for this, if anyone comes back to this and is interested.

您可以建议一个网页URL,该URL可以是带有 tel:链接的页面。无论是使用服务器端的工作还是仅使用简单的JavaScript(我的使用简单的JavaScript),都可以更新链接。

You can suggest a webpage URL, which can be a page which has a tel: link from there. Either using server side work or just simple JavaScript (mine uses simple JavaScript), you can update the link.

我的链接在下面-随时使用,我使用在我的应用中这很基本,文档在注释中:

My link is below - feel free to use it, I use it in my app. It's pretty basic, the documentation is in the comments:

https://domdomegg.github.io/linkgenerator?href=tel%3A%2B442070313000&bgcolor=607d8b&buttontext=Click% 20to%20call%20Google

这篇关于发起电话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆