AppTest
Posts: 0
Joined: Wed May 02, 2012 8:17 pm

Sending SMS (text message)

Hello!

Is there a way to send a text message to a predefined phone number?

I'm trying to create a button that sends a text message (SMS) with the user location.

For example User clicks the button Admin get a text message that says:
"Hello, I'm here: Main Street 15, San Diego, USA"

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Sending SMS (text message)

You can send an SMS message via some API. Here is an example using ATT API:
http://help.tiggzi.com/getting-starte...

Or, call the native SMS app:

code
window.location.href='sms:xxxxxxxxxx';
/code

Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Sending SMS (text message)

I had this working before like this

window.location.href = "sms:" + $('#number').val() + "?body=" + messagetext;

But now i get this error when I test

The address wasn't understood

Firefox doesn't know how to open this address, because the protocol (sms) isn't associated with any program.

You might need to install other software to open this address.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Sending SMS (text message)

It won't work in desktop browser, only on the phone.

Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Sending SMS (text message)

Here's the error from firebug

NS_ERROR_UNKNOWN_PROTOCOL: Component returned failure code: 0x804b0012 (NS_ERROR_UNKNOWN_PROTOCOL) [nsIDOMLocation.href]
[Break On This Error]

xhr.send( ( s.hasContent && s.data ) || null );

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Sending SMS (text message)

Won't work in desktop browser. SMS can only be sent from a phone.

Return to “Issues”