JS in SMS
Alexandre Morgaut & Greg McCarvell
JS.everywhere(2013) - Treasure Island, SF
Agenda
Why care about SMS?
Links and Forms
HTML5
Apache Cordova
The Cloud / The Server
Why care about SMS?
Dead Zones
Many Dead Zones: subway, rural communities...
Wifi / 4G / 3G / Edge / GPRS are not always available
SMS are avai...
Foreign Countries
Data Roaming is very expensive
SMS are usually affordable
SMS are usually supported everywhere
User Friendly
Phones create notifications for SMS
Notifications are often not as detailed for mails
No mail account to config...
SMS in Links (and Forms?)
RFC 5724
URI Scheme for Global System for Mobile Communications (GSM)
Short Message Service (SMS)

sms:+33123456789,+33678...
HTML Form
<form method="GET" action="http://example.com/">
<label for="body">Write your Message</label>
<textarea name="bo...
HTML Form
<form method="GET" action="sms:+12345678901">
<label for="body">Write your Message</label>
<textarea name="body"...
iOS

sms:+33123456789,+33678901234;body=Hello%20World
Link
<a href="sms:+15552345678">Phone only</a>
<a href="sms:?body=Hello, world">Body only</a>
<a href="sms:;body=Hello, wo...
alternative schemes
“smsto:”
SMS in HTML5
Mozilla WebSMS
// There are several ways to retrieve a valid phone number
var message = "Hi!";
var number = "1234";
naviga...
“The Messaging API”
Device APIs W3C Working Group
navigator.device.sendMessage(
"sms:+460000000001?body=Welcome%20%to%Atla...
“Messaging API”
System Application W3C Working Group
navigator.messaging.sms.send(
'+1234567890',
'How are you?'
).done(
f...
Contacts
Device APIs
Pick Contact Intent
System Application
Contact Manager API

http://www.w3.org/TR/contacts-api/
http:/...
Apache Cordova
Cordova Plugins
iOS
PhoneGap SMSComposer
Androïd
SMS inbox_sent access
SMSPlugin
SMSSendPlugin
ContactView

https://github...
The Cloud / The Server
Cloud Communication
Twilio

Tropo

Nexmo

...
Cloud Communication
Twilio
SMS, MMS,Voice
REST API
twilio.js
node.js SSJS connector
wakanda SMS connector

https://www.twi...
wakanda-twilio
Demo

https://github.com/AMorgaut/wakanda-twilio
Thank You!
http://www.wakanda.org/
http://www.twilio.com/
https://github.com/amorgaut
https://github.com/mccarvell
Upcoming SlideShare
Loading in...5
×

JS in SMS - JS.everywhere(2013)

3,151

Published on

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,151
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
19
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

JS in SMS - JS.everywhere(2013)

  1. 1. JS in SMS Alexandre Morgaut & Greg McCarvell JS.everywhere(2013) - Treasure Island, SF
  2. 2. Agenda Why care about SMS? Links and Forms HTML5 Apache Cordova The Cloud / The Server
  3. 3. Why care about SMS?
  4. 4. Dead Zones Many Dead Zones: subway, rural communities... Wifi / 4G / 3G / Edge / GPRS are not always available SMS are available almost everywhere
  5. 5. Foreign Countries Data Roaming is very expensive SMS are usually affordable SMS are usually supported everywhere
  6. 6. User Friendly Phones create notifications for SMS Notifications are often not as detailed for mails No mail account to configure
  7. 7. SMS in Links (and Forms?)
  8. 8. RFC 5724 URI Scheme for Global System for Mobile Communications (GSM) Short Message Service (SMS) sms:+33123456789,+33678901234?body=Hello%20World http://tools.ietf.org/html/rfc5724
  9. 9. HTML Form <form method="GET" action="http://example.com/"> <label for="body">Write your Message</label> <textarea name="body">Hello</textarea> <input type="submit" value="Send"> <form> http://example.com/?body=Hello
  10. 10. HTML Form <form method="GET" action="sms:+12345678901"> <label for="body">Write your Message</label> <textarea name="body"></textarea> <input type="submit" value="Send"> <form> Don’t work :-( sms:+12345678901?body=Hello
  11. 11. iOS sms:+33123456789,+33678901234;body=Hello%20World
  12. 12. Link <a href="sms:+15552345678">Phone only</a> <a href="sms:?body=Hello, world">Body only</a> <a href="sms:;body=Hello, world">;body only</a> <a href="sms:+15552345678?body=Hello World">Phone and ?body</a> <a href="sms:+15552345678;body=Hello World">Phone and ;body</a> <a href="sms://+15552345678">Phone only (sms://)</a> <a href="sms://+15552345678?body=Hello, World">Phone and body (sms://)</a> http://bradorego.com/test/sms.html
  13. 13. alternative schemes “smsto:”
  14. 14. SMS in HTML5
  15. 15. Mozilla WebSMS // There are several ways to retrieve a valid phone number var message = "Hi!"; var number = "1234"; navigator.mozMobileMessage.send(number, message); https://developer.mozilla.org/en-US/docs/WebAPI/WebSMS
  16. 16. “The Messaging API” Device APIs W3C Working Group navigator.device.sendMessage( "sms:+460000000001?body=Welcome%20%to%Atlantis", null, successCB, errorCB ); navigator.device.sendMessage( "mms:+460000000001?body=Welcome%20%to%Atlantis", [image1, image2], successCB, errorCB ); http://www.w3.org/TR/messaging-api/
  17. 17. “Messaging API” System Application W3C Working Group navigator.messaging.sms.send( '+1234567890', 'How are you?' ).done( function(message) { window.console.log( 'Message with identifier ' + message.messageID + ' sent at ' + message.timestamp ); }, function(error) { window.console.error('Error: ' + error); } ) http://www.w3.org/TR/messaging/
  18. 18. Contacts Device APIs Pick Contact Intent System Application Contact Manager API http://www.w3.org/TR/contacts-api/ http://www.w3.org/TR/contacts-manager-api/
  19. 19. Apache Cordova
  20. 20. Cordova Plugins iOS PhoneGap SMSComposer Androïd SMS inbox_sent access SMSPlugin SMSSendPlugin ContactView https://github.com/phonegap/phonegap-plugins
  21. 21. The Cloud / The Server
  22. 22. Cloud Communication Twilio Tropo Nexmo ...
  23. 23. Cloud Communication Twilio SMS, MMS,Voice REST API twilio.js node.js SSJS connector wakanda SMS connector https://www.twilio.com
  24. 24. wakanda-twilio Demo https://github.com/AMorgaut/wakanda-twilio
  25. 25. Thank You! http://www.wakanda.org/ http://www.twilio.com/ https://github.com/amorgaut https://github.com/mccarvell
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×