Fork me on GitHub

EnvayaSMS SMS gateway for Android

Frequently Asked Questions

Why not use X as an SMS gateway instead of an Android app? (where X = Twilio, Tropo, Clickatell, FrontlineSMS, RapidSMS, Kannel, etc.)

The existing alternative methods for creating SMS gateways can generally be categorized as hosted services (e.g. Twilio, Tropo, Clickatell), connecting GSM phones/modems to a computer (e.g. FrontlineSMS, RapidSMS, Kannel), and partnering directly with mobile operators.

The table below summarizes the major benefits and drawbacks of each of these methods for creating an SMS gateway:

  Benefits Drawbacks
Hosted services
  • High message throughput
  • Easy to deploy
  • No local numbers in many countries
  • Usually no MMS support
Connecting modem
to computer
  • Can work with inexpensive phone
  • Expensive hardware costs
  • Lots of moving parts to keep working
  • Very difficult for non-technical users to deploy
  • Low message throughput
  • No MMS support
Partnering with
mobile operators
  • High message throughput
  • Can provide free service to users via shortcode
  • Usually very expensive
  • Requires operator approval
  • Long setup time

EnvayaSMS is ideal for situations where no hosted services with local numbers are available in a particular country, or when it is necessary to receive MMS messages.

EnvayaSMS likely has lower throughput than hosted services or partnering with mobile operators, but should be able to forward up to a few thousand messages per phone per day.

How fast can EnvayaSMS send SMS messages?

The rate at which EnvayaSMS can send messages depends on several factors, including your phone, your network, and the length of the SMS messages you're sending.

Using an LG 540 with T-Mobile, we were able to send 50 outgoing SMS messages (each 160 characters long) in 4 minutes 17 seconds, for an average of 1 message every 5.1 seconds (~12 messages/minute, ~700 messages/hour).

In a different test, EnvayaSMS sent 176 outgoing SMS messages (with an average length of 7 characters) in 9 minutes 50 seconds (using the same phone), for an average of 1 message every 3.4 seconds (~18 messages/minute, ~1100 messages/hour).

To increase the rate at which you can send SMS messages, you can install EnvayaSMS on multiple phones and balance outgoing SMS messages between them. EnvayaSMS also allows you to set priority levels on outgoing SMS messages, so important transactional messages can be delivered before low-priority notifications.

In order to send more than 100 messages per hour with a single phone, it is necessary to install EnvayaSMS Expansion Packs.

EnvayaSMS can't connect to my dev server! What's wrong?

EnvayaSMS may be unable to connect to your development web server if it is blocked by a firewall on your computer, or if your computer has a IP address that's inaccessible from your phone's network.

If your Android phone is on the same Wi-Fi network as your development web server, configure the firewall on your development computer to allow incoming connections to your web server, then simply enter your computer's IP address in EnvayaSMS as the Server URL.

If you're testing with the phone's mobile data connection, or if your phone and development computer are on different Wi-Fi networks, the IP address of your development web server is likely inaccessible to the phone.

To allow the phone to connect to your development computer, you can set up a reverse SSH tunnel between your development computer and a server with a public IP address.

To set up a reverse SSH tunnel, you can either:

What phones are compatible with EnvayaSMS?

EnvayaSMS should work on any phone with Android 1.6 (Donut) or higher. As of 9/23/2011, over 579 different phone models are compatible with EnvayaSMS.

EnvayaSMS has been tested and is known to work with the following phones:

Does EnvayaSMS use envaya.org's servers?

No. When using EnvayaSMS, your phone connects to your own web server. The EnvayaSMS Android app does not connect to envaya.org or any third-party servers. In particular, you do not need to register for envaya.org.

For information about configuring a web server to connect to EnvayaSMS, see the API Reference page.

If you don't want to set up your own server, try Telerivet instead, which makes it easy to deploy an SMS service without setting up your own server.

My battery life decreased when I use AMQP to send push notifications! What's wrong?

The AMQP heartbeat setting has a significant impact on battery life. (The phone's CPU will wake up for 5 seconds in order to send each heartbeat.) To increase the battery life, choose a longer AMQP heartbeat interval, such as 300 seconds.

What is the relationship between EnvayaSMS and envaya.org?

We originally developed EnvayaSMS to enable civil society organizations in East Africa to interact with envaya.org via SMS and MMS, such as by posting news updates and photos to their website.

We realized that EnvayaSMS would be useful for any web service that needs to send and receive SMS/MMS, and decided to make EnvayaSMS available for anyone building their own applications.

Development of EnvayaSMS is currently led by the envaya.org team, but anyone is welcome to contribute to improve it.

What is the difference between EnvayaSMS and KalSMS?

The source code for EnvayaSMS was originally based on KalSMS, an open-source project started by Nir Yariv in 2010. KalSMS first introduced the idea of a simple SMS gateway implemented entirely as an Android app.

EnvayaSMS builds upon the idea of KalSMS by adding many new features that are necessary when deploying an SMS gateway in the field, such as sending more than 100 messages per hour, authenticating the phone to the server, and retrying forwarding messages after transient errors. For a complete list of changes, see the History page.

EnvayaSMS's server API is incompatible with that of KalSMS. Anyone switching from KalSMS to EnvayaSMS must update their server to use the new API described on the API Reference page.

As of 2011, KalSMS is no longer actively developed, and new development will occur on the EnvayaSMS project.

What is the difference between EnvayaSMS and SMSSync?

SMSSync SMS Gateway is an alternative Android SMS gateway app developed by Ushahidi.

EnvayaSMS contains several features not present in the current version of SMSSync, such as receiving MMS messages, sending more than 100 outgoing SMS messages per hour, notifying the server of the status of outgoing messages, and showing log messages to facilitate troubleshooting.