浏览器自定义协议,目前感觉UC浏览器做的是最棒的了。支持的比较全,当然,国外的chrome也支持的比较好。但是它似乎对这个并不感兴趣。
针对短信协议:SMS URI SCHEME,要支持四种协议:sms: sms:// smsto: smsto://
针对电话只有这一种:tel:
针对邮箱格式也只有这一种,只不过后面可以带参数:mailto:
针对intent:协议,目前4.2的android源码中就支持这种协议,相关的 协议方法参看:Intent中parseUri, toUri。
具体的格式要求可以参考维基百科中的文档:http://en.wikipedia.org/wiki/URI_scheme
Iphone支持的自定义协议
http://wiki.akosma.com/IPhone_URL_Schemes#SMS
第一:sms uri scheme
浏览器自定义协议测试 sms: smsto: sms:// smsto:// mms: mmsto: mms:// mmsto://
短信发送模式包括:
1.使用SMSManager发送短信,发送的短信不存于“信息”中。
2.使用ContentResolver发送短信,短信存放于“信息”中。
3.使用Intent发送短信,调用系统的“信息”程序发送
1.使用SMSManager发送短信,发送的短信不存于“信息”中。
2.使用ContentResolver发送短信,短信存放于“信息”中。
3.使用Intent发送短信,调用系统的“信息”程序发送
MMS
The Multimedia Messaging Service (MMS) is the standard way to send messages with multimedia content (images, video, or any attached content).
all international numbers MUST begin with a "+" character.
1. Both must be either a <local-number> or a <global-number<, i.e., start with a "+". 2. The <global-number-digits> and the <local-number-digits> must be equal, after removing all visual separators.
参考链接:
http://www.ericfeminella.com/blog/2013/01/01/invoking-native-mobile-applications-with-uri-schemes/
http://www.ericfeminella.com/blog/2013/01/01/invoking-native-mobile-applications-with-uri-schemes/
http://tools.ietf.org/html/draft-wilde-sms-uri-20
http://www.ietf.org/rfc/rfc5724.txt
http://www.linuxidc.com/Linux/2013-07/86972.htm
http://blog.csdn.net/sam_zhang1984/article/details/7095885
http://www.nfc-research.at/fileadmin/papers/2011/smsuribug_mr.pdf
http://developer.51cto.com/art/201001/181339.htm
http://www.linuxidc.com/Linux/2010-08/27943.htm
我自己写的一些测试例子:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<pre>
<a href="sms:10010">联通客服</a>
sms:
<a href="sms:">Send an SMS</a> sms: <br/>
sms://
<a href="sms://">Send an SMS</a> sms:// <br/>
sms://?body=Visit%20the%20best%20site%20at%20http://mobilexweb.com
<a href="sms://?body=Visit%20the%20best%20site%20at%20http://mobilexweb.com"> sms://?body=Visit <a><br/>
sms://+3490322111
<a href="sms://+3490322111"> sms://+3490322111 </a>
sms://+3490322111?body=Interested%20in%20Product%20AA2
<a href="sms://+3490322111?body=Interested%20in%20Product%20AA2"> sms://+3490322111?body=Interested%20in%20Product%20AA2 </a><br/>
sms:+15105550101?body=hello%20there
<a href="sms:+15105550101?body=hello%20there"> sms:+15105550101?body=hello%20there </a> <br/>
sms:+15105550101,+15105550102?body=hello%20there
<a href="sms:+15105550101,+15105550102?body=hello%20there"> sms:+15105550101,+15105550102?body=hello%20there </a>
sms://3490322111
<a href="sms://3490322111"> sms:// </a>
sms:15105550101?body=hello%20there
<a href="sms:15105550101?body=hello%20there"> sms: - body </a> <br/>
sms:15105550101;15105550102?body=hello%20there
<a href="sms:15105550101;15105550102?body=hello%20there"> sms: - body </a>
有2个?号