sms: link with alphabetical parameters interpreted as numbers on Samsung Galaxy S7
Asked Answered
C

3

11

I have a link on my website to open up a text with a new message. The following link works on most Android phones:

sms:5555555555?body=JOIN

But on the Galaxy S7, the ?body=JOIN parameter is interpreted to be a part of the phone number itself, as if the letters we input on a keypad. So the example above, would open up a new message to the phone number: 555555555526395646 and an empty message body.

I don't have an s7 myself so it's difficult to debug. Any ideas what else I can try to make it work as expected on the s7?

Catima answered 11/10, 2017 at 3:23 Comment(4)
You could try installing Android Studio and emulating a S7 device to try your site in it.Kenlay
I have a Galaxy S7 and I can't reproduce this behavior. Any more info?Karakalpak
@BenP. cannot reproduce? maybe then the OP must have some issue with his/her site...Rhizogenic
try adding jquerymobile.com to your projectPhysiognomy
S
1

Different platform wise it will work differently. check challenges section on this link

For iOS same problem here and for android its partially support

Schalles answered 11/10, 2017 at 4:17 Comment(0)
K
0

As Rajesh suggests, this will widely differ for different platforms, and sometimes for different version. This is the structure you would use for Android :

<a href="sms:/* Phone Number */?body=/* Body of the message */">Link</a>

And for iOS :

<a href="sms:/* Phone Number */&body=/* Body of the message */">Link</a>

Keep in mind that these formats can change (in your example the format works on most Android devices, but not on an S7; in other examples, the format was different for sending SMS in iOS 7 and iOS 8). Also, note that the app which handles the SMS URI can be changed on Android, and manufacturers take advantage of it (which may be what caused the malfunction on the S7 in the first place). So tweaking with exceptions can be a little hacky.

Otherwise, you could consider using an existing package like sms or a service like Twilio.

Katy answered 19/10, 2017 at 9:6 Comment(0)
R
0

Although I cannot reproduce the behaviour, here are some links from the RFC's addressing the sms: and tel: URI schemes.

Under section 2.2 of RFC 5724 - URI Scheme for GSM Short Message Service is the formal definition of the URI, which says that the sms-recipient (the phone number you want to send the sms to) must be equal to telephone-subscriber which is defined in RFC 3966.

Although, your URI seems to work correctly on most of the devices (quirk? edge-case?), you must cross-check the format with the one described in the RFC to be sure that it's standards-compliant. Or maybe it's possible that it's a software/parser bug on the device itself! (not sure though...)

Rhizogenic answered 25/10, 2017 at 13:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.