[英]Making phone call in worklight 6.2
In Worklight 6.0, I can easily make phone call using: window.location="tel:12345679";
在Worklight 6.0中,我可以使用以下方式轻松拨打电话:
window.location="tel:12345679";
But in Worklight 6.2, this doesn't work. 但是在Worklight 6.2中,这不起作用。 in Android it will throw an error:
在Android中,它将引发错误:
Error: The protocal isn't supported.
I've tried adding the CALL_PHONE permission and add the below line to config.xml, but no luck: 我尝试添加CALL_PHONE权限并将以下行添加到config.xml中,但是没有运气:
<access origin="tel:*" launch-external="yes">
Anybody know how? 有人知道吗?
Change <access origin="*"/>
更改
<access origin="*"/>
To <access origin="tel:*" launch-external="true">
要
<access origin="tel:*" launch-external="true">
Then, both of the below worked: 然后,以下两个工作:
<a href="tel:+1-800-555-1234">call this number</a>
, <a href="tel:+1-800-555-1234">call this number</a>
, wlCommonInit()
): document.location.href = "tel:+375292771265";
wlCommonInit()
): document.location.href = "tel:+375292771265";
I'm using IBM Worklight Studio 6.2.0.01-20141015-1508 (latest version from the Eclipse Marketplace). 我正在使用IBM Worklight Studio 6.2.0.01-20141015-1508(Eclipse Marketplace中的最新版本)。
Related question: How to open the phone dialer? 相关问题: 如何打开电话拨号器?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.