Your SlideShare is downloading. ×
JS in SMS - JS.everywhere(2013)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

JS in SMS - JS.everywhere(2013)

2,893
views

Published on

Published in: Technology, Business

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,893
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
18
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. JS in SMS Alexandre Morgaut & Greg McCarvell JS.everywhere(2013) - Treasure Island, SF
  • 2. Agenda Why care about SMS? Links and Forms HTML5 Apache Cordova The Cloud / The Server
  • 3. Why care about SMS?
  • 4. Dead Zones Many Dead Zones: subway, rural communities... Wifi / 4G / 3G / Edge / GPRS are not always available SMS are available almost everywhere
  • 5. Foreign Countries Data Roaming is very expensive SMS are usually affordable SMS are usually supported everywhere
  • 6. User Friendly Phones create notifications for SMS Notifications are often not as detailed for mails No mail account to configure
  • 7. SMS in Links (and Forms?)
  • 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. 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. 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. iOS sms:+33123456789,+33678901234;body=Hello%20World
  • 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. alternative schemes “smsto:”
  • 14. SMS in HTML5
  • 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. “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. “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. 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. Apache Cordova
  • 20. Cordova Plugins iOS PhoneGap SMSComposer Androïd SMS inbox_sent access SMSPlugin SMSSendPlugin ContactView https://github.com/phonegap/phonegap-plugins
  • 21. The Cloud / The Server
  • 22. Cloud Communication Twilio Tropo Nexmo ...
  • 23. Cloud Communication Twilio SMS, MMS,Voice REST API twilio.js node.js SSJS connector wakanda SMS connector https://www.twilio.com
  • 24. wakanda-twilio Demo https://github.com/AMorgaut/wakanda-twilio
  • 25. Thank You! http://www.wakanda.org/ http://www.twilio.com/ https://github.com/amorgaut https://github.com/mccarvell