Announcements
Design Notebook Discussion
Let’s take a few minutes to talk about your Design Notebook entries from last week. First let’s review the assignment from last week.
Now let’s use the randomizer to pick who’ll show their work:
javascript: alert(Math.floor(Math.random()*17)+1);
SMS
SMS stands for Short Message Service and is a text-based, point-to-point messaging protocol. SMS messages are limited to 160 characters.
Availability
SMS is virtually universal, being available on both feature phones and smart phones. It it part of the GSM (Global System for Mobile Communications) network standard, and is available on most 3G & 4G networks.
There are an estimated 7 billion mobile subscribers globally, that’s about 95% of the world population. Smartphones are estimated to make up about 17% of that total. Since SMS is available on most features phones and smartphones, most of the 7 billion subs have SMS capabilities.
Examples
The Network Effect, Social Graph & “Going Viral”
- 1 fax machine is useless, 20 million has a lot more value. The network effect states that the value of something increases with the number of nodes in the network.
- Facebook Friends and 6 Degrees of Kevin Bacon
- What does it mean to “go viral”?
Influencers & R number
- In Malcolm Gladwell’s The Tipping Point, The Law of the Few dictates that some individuals are better at transmitting information than others. Connectors extend the social graph, Mavens are experts in subject, and Salespeople are masters of persuasion. Together, these few create tipping points, where a message goes viral.
- In epidemiology, the basic reproduction number, R0 indicates the rate of transmission of a disease. When R0 < 1, the disease will die out. When R0 >= 1, it will continue to spread.
- The trick to going viral then, is to get your message to the “Few” that can leverage their social graph to obtain an R0 value of > 1, the bigger the number, the more viral.
Receiving SMS
- Log into your Twilio Account and navigate to your Manage Numbers page.
- Download and extract the SMS repository from the class Github page
- Using Filezilla, Fetch or another FTP client, upload the hello.xml file to your TCNJ web account.
- Back on your Twilio Account Manage Numbers page, click into your number to view your number details.
- In the Messaging field, input the full URL to your hello.xml file on your TCNJ web account, i.e. http://www.tcnj.edu/~username/imm-470-03/sms/hello.xml
- On your phone, text a message to your Twilio phone number.
If all goes according to plan, you should receive a text back from your Twilio service.
Let’s take a look at the code for hello.xml on Github.
Responding to SMS
- First, let’s rewrite our hello.xml file as a PHP file, to give us greater flexibility, we can use the one already converted in the sms repository you downloaded earlier.
- Upload the hello.php file from the sms repository to your TCNJ web server account.
- On your Twilio Account number detail page, update the URL in the Message field to point to the new hello.php file instead of hello.xml.
- On your phone, text a message to your Twilio phone number.
Did you receive a text back from Twilio?
Let’s have a look at hello.php on Github.
How about MMS?
While we’re at it, let’s try sending a multimedia file as a message. This is known as MMS, for Multimedia Message Service.
- Upload the hello-mms.php file from the sms repository to your TCNJ web server account.
- On your Twilio Account number detail page, update the URL in the Message field to point to the new hello-mms.php file instead of hello.php.
- Text your Twilio phone number. What happens?
Let’s check out the code.
What Info Comes in a Message?
One useful feature of the Twilio service is that it passes in a number of pieces of information to your Message url. Two of these “request” variables include a “From” variable, which contains the phone number of the sending device, and a “Body” variable, which contains the text of the message sent to you.
Let’s take a look at the code on Github.
- Upload the hello-request-info.php file from the sms repository to your TCNJ web server account.
- On your Twilio Account number detail page, update the URL in the Message field to point to the new hello-request-info.php file instead of hello-mms.php.
- On your phone, text a message to your Twilio phone number.
You should receive a message back that includes your phone number and the text of your original message.
For more details on what data gets passed into your Twilio script, check out TwiML Message Requests.
Creating a Personalized Phone Book
Armed with this Request data, we can use PHP to create a more personalized messaging experience for senders whose phone numbers we already know – sort of like a phone book sms app.
- Upload the hello-mom.php file from the sms repository to your TCNJ web server account.
- On your Twilio Account number detail page, update the URL in the Message field to point to the new hello-mom.php file instead of hello-request-info.php.
- On your phone, text a message to your Twilio phone number, have someone else on you phone list call your Twilio number. What message do they receive? What about someone who’s not on your phone list?
Let’s take a look at the code.
Voice-Activated SMS
What if you could have your answering machine send an SMS to particular people in your phone book when they call your voice line?
You can do it with Twilio:
- Upload the hello-mom-voice.php file from the sms repository to your TCNJ web server account.
- On your Twilio Account number detail page, update the URL in the Message field to point to the new hello-mom-voice.php file instead of hello-mom.php.
- Have someone on your phone list call your Twilio number with their cell phone. When they get your voicemail, your service will send an SMS with wahtever info you want them to get.
Let’s check out hello-mom-voice.php.
Sending SMS
In addition to replying to SMS messages you receive at your Twilio number, you can also use the Twilio REST API to send messages in bulk to a list of contact numbers.
Let’s have a look at the code on Github.
*The send-sms-notification.php code in the class sms repository does NOT currently work on the TCNJ web server accounts due to security issues on the TCNJ servers. It should work on other hosting environments or locally on your own computer if you’re running MAMP or such.
Weekly Challenge
Imaging you’re part of a flash mob a cappella group. Everyone in your group has a phone, but not everyone is on FB or Snapchat and there’s no email list, website or FB page. You’re scheduled to meet up at 8:00 this evening at Quakerbridge Mall for a performance, but there’s bad weather moving in, and you really don’t have time to monitor the weather AND make 15 phone calls.
Working independently or in groups, sketch out and prototype an SMS app you can use to automatically update your fellow mobsters on performance status whenever they message you with the phrase “performance status”.
Homework Assignment
The State of SMS
Create a new page in your Design Notebook and name it “The State of SMS” along with today’s date. Read the following articles about 3rd party messaging apps surpassing SMS in message volume. Discuss what this means with respect to SMS as a messaging channel in various user-centered contexts – including broadband availability, open vs. private services, and audience splintering – is SMS the “great equalizer”? Support your argument with additional data about SMS & 3rd party messaging app usage in a specific location & be sure to consider
Partner Organizations
Create another page in your Design Notebook, naming it “Partner Organizations and today’s date. Review the information about the four partner organizations, or search the web for other organizations that interest you, and discuss which appeal to you most and why.
- Valley of 1000 Hills (South Africa)
- DramAidE (South Africa)
- CEWOD (Tanzania)
- Ticah (Kenya)
- Be sure to share your Google Presentation and post a link to it as a comment to this blog post below.
*Assignments are due before class begins on Mondays. Be prepared to present your work in class for discussion.
More Resources
- Twillio SMS & MMS PHP Quickstart
- Network Effect Wikipedia entry
- Social Graph Wikipedia entry
- Viral Videos Wikipedia Entry
- Basic Reproduction Number Wikipedia entry
- Basic Epidemic Theory
- PBS’s Generation Like by Douglas Rushkoff
- Six Degrees of Kevin Bacon Wikipedia Entry
- Change.org webinar – I’ll Text you! SMS for your non-profit campaign
- GupShup – Unified Messaging