Page 1 of 1

Tap to text

Posted: Fri Oct 18, 2019 4:02 pm
by bry
I have added code to a webpage to allow tap to text from smart phones. But for some reason this code only works from iPhones and not from my Samsung S7 android.

Any help GREATLY APPRECIATED!!!S Pablo, can you tell me what I have done incorrectly???

Code I added is:

Code: Select all

<a href="sms:+1usaphonenumber&body=Hi%20I'm%20texting%20from%20website!">Tap here to text!</a><br><br>
</span><span style="color:#000000;font-family:'Times New Roman';font-size:48px;">

Re: Tap to text

Posted: Fri Oct 18, 2019 5:20 pm
by Pablo
Maybe the samsung s7 does not support it?

Re: Tap to text

Posted: Fri Oct 18, 2019 6:07 pm
by crispy68
Is there a reason why the <span> tags are out of order?

Also...should it be '?body' after the number?

Re: Tap to text

Posted: Sat Oct 19, 2019 1:52 am
by bry
Thanks, could be a mistake. I have worked on this until I am cross eyed. I can make it work with iPhones or androids but not both.

I would greatly appreciate if you would write code the way you think it should be in a reply.

I have tried &, ?, and ; after the cell phone number. Nothing has worked for both iPhone and androids.

THANKS AGAIN FOR YOUR THOUGHTS ON THIS.

Re: Tap to text

Posted: Sat Oct 19, 2019 6:29 am
by Pablo
Note that you can also use the built-in link functionality and set the link type to 'sms'
Then all you will have to do is specify the phone number (and message)

Re: Tap to text

Posted: Sat Oct 19, 2019 12:50 pm
by bry
Thanks Pablo, I will try that. I am using an automated php page generation system using Microsoft Access. I generate the pages automatically for a database of about 1400 people. The people who want their cell phones shown can also have Tap to Text. So other members can conveniently text them.

Re: Tap to text

Posted: Sat Oct 19, 2019 8:38 pm
by bry
Hi Pablo, The link as you suggested works on Androids but not as desired for iPhones. For both, I am taken to my message texting, but Android shows the message Hi "name", This text message sent from "website".

But on iPhones, in the recipient space after the name, the message is in lower case without spaces between the words:thisisatextmessagesentfrom....

/test12.info/brysms/iphone.jpg

Re: Tap to text

Posted: Sat Oct 19, 2019 8:49 pm
by Pablo
This is standard browser functionality, so I do not have any control over how it works. Each browser has its own interpretation of this feature.
Note however that the message should be encoded.
https://www.w3schools.com/tags/ref_urlencode.asp

Re: Tap to text

Posted: Sat Oct 19, 2019 10:50 pm
by bry

Re: Tap to text

Posted: Sat Oct 19, 2019 11:45 pm
by bry
I can now make tap to text work on both iPhone and android with the same code. But I can't do it and include a line of text. That was really trick but if I can't make the text appear on BOTH iPhones and androids with the same code, then I have to leave it off.

The code is very simple without the text:

Code: Select all

<a href="sms:+1900-000-0000">Tap to Text!</a><br><br>
The phone number is fake of course.

Thanks