Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

JS in SMS - JS.everywhere(2013)

4,298 views

Published on

Published in: Technology, Business
  • Be the first to comment

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

×