- Home /
Application openurl sms parameters
Hi , I wanted to send an sms by clicking a button. I can use Application.OpenURL("sms:"+ phoneNumber); to send the sms , but this way the application directs to sms messaging app and only fills out the number , but I want to also fill the message content. How can I add more parameters to that? in email you can use ? to add parameters , but how is it done in sms ? is there a reference for that?
I'll appreciate if you can help me with this.
thanks
Answer by Hai Lee · Feb 20, 2014 at 10:56 AM
string url = String.Format("sms:{0}?body={1}", numbers, message);
I am trying this but it is including the ?body=message as the person's contact I am trying to text. So it has the number and the entire body along with ? and body= param in the send field. At first it wasn't working at all until I urlescaped the message. Now even with a simple message of "hey" it tries to put everything in the recipient's contact number.
I'm trying all kinds of variations but here is my latest attempt:
string url = String.Format("sms:{0}?body={1}", 5741234567, WWW.EscapeURL("Click Here"));
Any ideas?
Answer by ickydime · Nov 14, 2015 at 10:23 PM
It appears to have changed in iOS 8. Now you need to do &body instead of ?body.
Ref the second answer here: http://stackoverflow.com/questions/6480462/how-to-pre-populate-the-sms-body-text-via-an-html-link