Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android sms link with a body parameter

Tags:

html

android

sms

I have a sms link on a webpage:

<a href="sms:+15553332222?body=message">SMS Link</a>

And that works great on my Nexus (running stock gingerbread) but two other phones (both HTC's on gingerbread with Sense UI) won't open the link saying "Invalid recipient". If I remove the body parameter on the link it works fine, but I need the body parameter. I've tried diffrent formatting of the number including +15553332222, 15553332222, 5553332222, +1-555-333-2222, and 555-333-2222. I've also tried using sms:, smsto:, and mms: with the same result.

I'm I doing it wrong? Is this a known problem for HTC's phones? If it is, is there a work around?

like image 687
Scott Avatar asked Nov 04 '22 02:11

Scott


1 Answers

Try

<a href="sms://+35555&body=Helloworld">

Use the ://

like image 193
Lionel Yeo Avatar answered Nov 07 '22 22:11

Lionel Yeo