电话链接 android 不工作 (Galaxy S5) [英] tel link android not working (Galaxy S5)

查看:36
本文介绍了电话链接 android 不工作 (Galaxy S5)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是移动混合应用开发的新手.我有一个用 Angular 和 Ionic 开发的 HTML 5 混合应用程序,在应用程序的一部分中,我想在用户单击电话号码时启动本机电话应用程序(或访问本机电话应用程序的各种方式的菜单).当我通过手机中的浏览器查看混合应用程序时,单击链接按预期工作.但是,如果我将应用程序部署到我的三星 Galaxy S5(通过cordova),点击链接没有任何作用.我尝试了以下语法:

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>

我使用的是 Cordova 3.6.0 和 Android SDK r23.0.2 窗口.

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

我用谷歌搜索过类似的问题,但结果不一致.

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 中添加这一行,让应用与外部应用共进午餐:<access origin="tel:*" launch-external="yes"/>

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

这篇关于电话链接 android 不工作 (Galaxy S5)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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