简体   繁体   English

Android上的href =“ tel:”尝试添加联系人,而不是触发呼叫

[英]href=“tel:” on android is trying to add contact instead of triggering a call

I have a standard html tag: 我有一个标准的html标签:

<a href="tel:08435034853"...

While IOS and some android devices are triggering call, others like nexus7/android4.4 are displaying popup with action buttons: Close / Add to contacts 当IOS和某些android设备触发呼叫时,诸如nexus7 / android4.4之类的其他设备则显示带有操作按钮的弹出窗口:关闭/添加到联系人

Couldn't actually find anything about it, is it how new android works? 实际上找不到任何有关它的信息,这是新android的工作原理吗?

Does anyone know is it possible to force a call on all android devices? 有谁知道可以在所有android设备上强制通话吗?

First of all, you might want to check out this thread too on this topic. 首先,你可能想看看太线程这个话题。 It has some potential tips which might work on some exceptional devices. 它具有一些可能在某些特殊设备上起作用的技巧。

Furthermore: not all Android devices are capable of voice calling. 此外:并非所有的Android设备都能语音通话。 Eg I'm pretty sure that the Nexus 7 that you're mentioning is not. 例如,我很确定您提到的Nexus 7不是。 In such cases it's a sensible alternative to offer the user to add the number to the contacts instead. 在这种情况下,为用户提供将号码添加到联系人的方法是明智的选择。 Isn't it possible that your problematic devices simply lack the voice calling feature? 您有问题的设备难道根本就没有语音通话功能吗?

Create one javascript function and add the following code: 创建一个javascript函数并添加以下代码:

function makeCall(contactNo) {
    document.location.href = 'tel:' + contactNo;
}

And this is working fine in android 4.4 这在Android 4.4中正常工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM