浏览器 自定义sheme sms tel mailto intent:


浏览器自定义协议,目前感觉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发送短信,调用系统的“信息”程序发送

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个?号
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值