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.
Making an SMS link is very easy in HTML. Here, we will see how to make the SMS link on a webpage. Approach: Using <a> href attribute: Enter the phone number in place of the URL and add sms: before it to make an SMS link. Add the text between the tags that will appear as the clickable link.
HTML Email Tag HTML <a> tag provides you option to specify an email address to send an email. While using <a> tag as an email tag, you will use mailto: email address along with href attribute. Following is the syntax of using mailto instead of using http.
Further to other answers I can confirm that smsto:555:bodytext does not work on an iPhone running iOS5.
What does work (and I've tested it) on Android is the format:
sms:444?body=hello
Example:
<a href="sms:444?body=hello">Tap to say hello!</a>
On iPhone the ?body=hello will prevent it working at all, and you should use just sms:555 instead.
sms:555
Example
<a href="sms:444">Tap to text us!</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With