android: sending SMS message on Verizon
Sometimes, writing android apps is harder than writing iPhone apps. Mostly, because android phones run on a wide variety of carrier networks, each with their own “quirks”…
For the last couple years, android apps could send text messages with the following snippet of code:
import android.telephony.gsm.SmsManager;
// some other stuff omitted.
SmsManager sm = SmsManager.getDefault();
sm.sendTextMessage(destination, service_center, "my message", null, null);
That only works because of the following assumptions: * your phone is on a GSM network * the destination specified knows how to send your message back to the proper recipient.
With the Verizon Droid series of phones, neither of those assumptions hold.
For the first, the newer android releases (>=2.1, i think), supply the android.telephony.SmsManager class, which has the same interface.
The second, i’ve found, is a bit more complicated. All email-to-sms-gateway’d messages on verizon come from the same 4-digit code “6245” (aka- MAIL on a numeric keypad). This gateway does not store any state on which messages were sent from which email addresses, so all responses must include the intended destination address.
To that end, i’ve added a new preference to Klaxon, under “Sms Settings” called “Send Destination”. If you are on Verizon, you will need to ensure that this box is checked, otherwise your messages will not arrive at their intended destination.
Reference links: Wikipedia list of Email to Sms gateways stackoverflow answer