什么是为移动浏览器设置电话链接的可靠方法? [英] What's a reliable method for setting up telephone links for mobile browsers?

查看:116
本文介绍了什么是为移动浏览器设置电话链接的可靠方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为移动浏览器设计一个快速页面。虽然手机上的浏览器(目标用户)之间几乎没有一致性,但我有一个电话号码,我希望尽可能轻松地从用户手机拨打电话。一个链接似乎是明显的选择;所以我建立了以下内容:

 < a href =tel:+18881235467> 1-888-123- 5467< / A> 

这对于更高级的浏览器(例如Android&黑莓浏览器,在其他手机上的可靠性要低得多。任何建议,使这个链接工作一贯和正确将不胜感激。

供参考,这是一个免费的美国国内电话,但我想像一些设备可能是寻找更通用的格式。

解决方案

我最终想出的是一个链接,它可以像这样工作:

 < a href =wtai:// wp / mc; 18881235467> 1-888-123-4567< / a> 

到目前为止,所有已测试的手机都能正常工作,包括Android,BlackBerry和 / em>笨重的旧手机。从我所收集的内容来看,链接的结构就像这样:



WTAI引用了无线电话应用程序接口。 wp /是指WTAPublic函数。 mc;是makeCall功能,然后你有电话号码。同样,你可以做这样的链接:

 < a href =wtai:// wp / ap; 18881235467 >添加到地址簿:1-888-123-4567< / a> 

这与mc相同;已经被ap;代替,它指向addPBEntry函数。这将电话号码添加到您的通讯录或类似的电话号码。



这两个网站对我的研究有帮助:


I'm working on a quick page intended for mobile browsers. While there is little consistency between browsers on cell phones (the target audience), I have a phone number that I would like to be as easy as possible to dial from the users phone. A link seems the obvious choice; so I set up the following:

<a href="tel:+18881235467">1-888-123-5467</a>

This seems to work OK on more advanced browsers such as the Android & BlackBerry browsers, it's a lot less reliable on other phones. Any advice on making this link work consistently and or correctly will be greatly appreciated.

FYI, this is a toll free domestic US call, but I imagine that some devices may be looking for a more general format.

解决方案

What I eventually came up with was a link that worked like this:

<a href="wtai://wp/mc;18881235467">1-888-123-4567</a>

This has worked on every phone tested so far, including Android, BlackBerry and some very clunky older phones. From what I gather, the structure of the link works like so:

WTAI references the Wireless Telephony Application Interface. The wp/ refers to the WTAPublic functions. The mc; is the makeCall function, and then of course you have the phone number. Similarly, you can do a link like this:

<a href="wtai://wp/ap;18881235467">Add to addressbook: 1-888-123-4567</a>

This is the same except mc; has been replaced by ap;, which refers to the addPBEntry function. This adds the phone number to your address book or similar stash of phone numbers.

These two sites were helpful in my research:

这篇关于什么是为移动浏览器设置电话链接的可靠方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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