Is there any way to detect whether a mobile device is capable of making voice calls / SMS messages?
This is important when applying tel: and sms:<
A new plot twist in this problem (as of Feb 2015) is that many desktop browsers now support click-to-call, however they won't auto-detect phone numbers.
So the nifty tricks floating around for sniffing out phone number auto-detection or touch capability, are now obsolete.
Mac OSX since Yosemite 10.9.2 has supported click-to-call with Facetime audio, and Windows 8 / IE11 does the same using Skype. Not sure about Chrome OS (Hangouts?). iPads use Facetime audio calls.
It looks like all web browsers from now onwards will support click-to-call. The question is really about how to prevent older browsers and desktop OS users from getting an error when clicking a tel: link.
I made a Javascript library to attempt to detect older desktop OS users that are before tel: link support, but it proved very problematic and complicated.
Right now my approach is either:
tag and desktops altogether and let auto-detection do it's link magic on mobile devicesI'm not crazy about any of these solutions, but I'm opting for B until the browser support landscape changes in the future. That way I have control over the tag, a desktop user can still click the phone # if they really want to, and I can swap easily in the future.