电话联系的Andr​​oid不工作(银河S5)银河、电话、工作、oid

2023-09-06 13:41:13 作者:5.き执迷不悟れ

我是新来的移动混合应用程序的开发。我在角和离子制定了HTML 5的混合应用,其中应用程序的一部分,我想,当用户点击一个电话号码来启动本地手机应用程序(或各种方式来获得原生手机应用程序的菜单)。当我通过浏览器查看我的手机的混合应用程序,点击链接按预期工作。不过,如果我将应用程序部署到我的三星Galaxy S5(通过科尔多瓦),攻链接什么都不做。 我试过下面的语法:

I'm new to mobile hybrid app development. I have a HTML 5 hybrid app developed in Angular and Ionic where in part of the application i want to launch the native phone app (or a menu of various ways to get to the native phone app) when a user clicks on a phone number. When i view the hybrid app through a browser in my phone, clicking on the links works as expected. However, if i deploy the application to my Samsung Galaxy S5 (via cordova), tapping the links does nothing. I've tried the following syntaxes:

<a href="tel:18888888">tel:18888888</a>
<a href="tel:+18888888">tel:+18888888</a>
<a href="tel://18888888">tel://18888888</a>
<a href="tel://+18888888">tel://+18888888</a>
<a href="tel:1-888-8888">tel:1-888-8888</a>
<a href="tel://1-888-8888">tel:1-888-8888</a>

我使用的是科尔多瓦3.6.0和Android SDK r23.0.2窗口。

I'm using Cordova 3.6.0 and the Android SDK r23.0.2 windows.

我GOOGLE了类似的问题,但结果是不一致的。

I've googled similar issues but the results are inconsistent.

有没有人有任何运气吗?似乎是一个共同的特点。我一定是失去了一些东西简单。

Has anyone had any luck with this? Seems like a common feature. I must be missing something simple.

推荐答案

您应该添加这行config.xml中,让应用程序的午餐外部应用程序: &LT;获得原产地=电话:*发射后外部=YES/&GT;

You should add this line in config.xml to let the app lunch an external app: <access origin="tel:*" launch-external="yes" />