As a rule, on Android, if you just show the phone number and the user clicks on it, he will drag it in the dialer. So you can just do
For more information, call us at <b>416-555-1234</b>
When the user clicks the bold part, as it is formatted as a phone number, a dialer will appear and show 4165551234 in the phone number field. Then the user just needs to press the call button.
Perhaps you can do
For more information, call us at <a href='tel:416-555-1234'>416-555-1234</a>
to cover both devices, but I'm not sure how much this will work. I will give it a try soon and let you know.
EDIT: I just tried my HTC Magic using root Rogers 1.5 with SenseUI:
For more information, call us at <a href='tel:416-555-1234'>416-555-1234</a><br /> <br /> Call at <a href='tel:416-555-1234'>our number</a> <br /> <br /> <a href='416-555-1234'>Blah</a> <br /> <br /> For more info, call <b>416-555-1234</b>
The first, surrounded by a link and printing a phone number, worked great. He pulled out a dialed hyphen and that's it. The second, saying our number with reference, worked exactly the same. This means that using <a href='tel:xxx-xxx-xxxx'> should work in all directions, but I would not suggest making my one test final.
A direct link to the number made expected: I tried to pull a nonexistent file from the server.
The latter did, as I mentioned above, and stopped the dialer, but without beautiful hyphens.
Tarka May 05 '10 at 2:51 p.m. 2010-05-05 14:51
source share