Sunday, September 8, 2013

How to trigger Phone CALL / SMS / MMS from mobile website


This is very important now a days. Since smart phone and tablet users and usability are growing like a mushrooms. So it is good to give numbers along with clickable which directly ring screen/dial pad or send a text to using SMS or send image through MMS. Actually HTML 5 makes it so simple :-)

CALL TO NUMBER

Call when click image/icon
<a href="tel:5551234567"><img src="callme.jpg" /></a>
Or
It can be with text or directly number
<a href="tel:+15555555555">Call us free!</a>
<a href="tel:+15555555555">+1 555 55 55555</a>

Mordern devices support the scheme
<a href="tel:555-555-5555">555-555-5555</a>

SEND SMS

Every one like to sent Short Message Service [Known as SMS]
Mobile browsers usually invoke SMS compose window from a link when it is clicked.
This will be done through two possible URI Schemes [sms://] or [smsto://]

Actually to detect this sms:// and smsto:// protocol, Server is using Wireless Universal Resource File called as WURFL

Syntax:
sms://[<destination number or Leave empty, Compose window will get/prompt to select number(s) or recipient(s)>][?parameters]
OR
smsto://[<destination number or Leave empty, Compose window will get/prompt to select number(s) or recipient(s)>][?parameters]

<a href="sms://">Send SMS</a>
<a href="sms://?body=Visit http://w3rider.blogspot.in for more information">

Invite a friend by SMS<a>

<a href="sms://+919944393833">Contact us by SMS</a>
<a href="sms://+9944393833?body=To join our community https://www.facebook.com/w3rider">Join to our community</a>

Not very sure about browser compatibility which one of the above will work.

<a href="sms://">Send SMS</a>
<a href="sms://?body=Visit http://w3rider.blogspot.in for more information">Invite a friend by SMS<a>
<a href="sms://+919944393833">Contact us by SMS</a>
***BlackBerry : Actually for BlackBerry networks it has to be used like PIN:<number>

SEND MMS

Multimedia Messaging Service (MMS) - it send messages with multimedia content(Image, Video and any form for attachment). Actually it works by upload to the carrier and allow the receipient to download it from the carrier.

This will help to open multimedia message composor

mmsto://<destination number>

*** Symbian devices allow to send link directly by using
mms:<url>

No comments: