简体   繁体   中英

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

I have a standard html tag:

<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

Couldn't actually find anything about it, is it how new android works?

Does anyone know is it possible to force a call on all android devices?

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. Eg I'm pretty sure that the Nexus 7 that you're mentioning is not. 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:

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

And this is working fine in android 4.4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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