如何启动/使用设备的原生功能的HTML5网页发送短信? [英] How to initiate/send SMS from a HTML5 webpage using devices native functions?
问题描述
我想知道我怎么可以用在Android和iPhone上的HTML5网页的Web控件打开发送短信申请。我想使用的设备原生短信发送程序,从相关网站的prepopulated值。
I am wondering how can I open the send SMS application by using a web control of a HTML5 page on Android and iPhone. I want to use the device native SMS sending app, with a prepopulated value from the web.
推荐答案
还包括其它的答案我可以证实,smsto:555:bodyText的做的没有的在iPhone上运行iOS5的工作。
Further to other answers I can confirm that smsto:555:bodytext does not work on an iPhone running iOS5.
这是什么工作,(我已经测试过)在Android上的格式是:
What does work (and I've tested it) on Android is the format:
sms:444?body=hello
示例:
<a href="sms:444?body=hello">Tap to say hello!</a>
?
在iPhone身上=你好将prevent它的工作在所有的,你应该只使用短消息:555,而不是
On iPhone the ?body=hello will prevent it working at all, and you should use just sms:555 instead.
短信:555
示例
<a href="sms:444">Tap to text us!</a>
这篇关于如何启动/使用设备的原生功能的HTML5网页发送短信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!