lab 1: sms services mit d-lab ict4d. d-lab ict for development lab 1: sms services slide 2 intro to...
TRANSCRIPT
![Page 1: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/1.jpg)
Lab 1:SMS Services
MIT D-Lab ICT4D
![Page 2: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/2.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 2
Intro to Lab Sessions
• Goal: Give overview and examples to jump-start you
• Three Sessions– SMS applications– J2ME (on-the-phone apps)– Advanced features (NFC, Location, MMS, etc.)
• But … we can’t teach everything in 3 sessions!– you’re expected to study and follow-up on your own– we’ll just give you simple educational examples – not necessarily the
best or most scalable solutions– you’re welcome to use other tools and techniques not taught in class
• These tools are works in progress -- You’re welcome to help!
![Page 3: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/3.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 3
Recap: Mobile Phone Capabilities, Apps
• SMS (Text Messaging) –based services– send text commands, receive info– receive alerts and subscriptions
• MMS (Multimedia Messaging) –based services– send and receive multimedia to/from server
• J2ME (Java 2 Micro Edition) applications– programs running on the phone– e.g., games
• Internet/Web services– via WAP (limited) and/or GPRS (dialup-speed connection)– via 3G (broadband speed connection)
• Location-based services– services that make use of location of users
• Micropayment applications– ability to send/transfer cellphone credits via SMS– leads to cash-less, credit-card less, electronic payment mechanisms
![Page 4: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/4.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 4
Example: SMS Job Finder Service
• Service On-Demand– User texts FINDJOB <JOB> to 123
• e.g., FINDJOB DRIVER
– Service responds (via SMS text message) with …
• Agency: JobsRUs. DRIVER needed as of 2/1/08, Call (987) 654-3210
• Subscription Service– User can subscribe to alerts
• e.g., FINDJOB SUBS DRIVER
![Page 5: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/5.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 5
MNOMNO
Mobile “Value-Added Services (VAS)” Architecture
Users
SMSC
in-house apps
direct connection
VAS gateway
aggregator
private “service” via GSM modem or phone
3rd party app providers (aka content providers, “CPs”)
small 3rd party CPs
![Page 6: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/6.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 6
Writing SMS Apps: Three Options
• direct to Mobile Network Operator
• via Aggregator
• using GSM modem or phone
![Page 7: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/7.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 7
Tools
Open Source
• Kannel
• SMSLib
• Gnokii, etc.
Commercial
• Aggregators– e.g., Clickatell
• Libraries for Using Private Lines
– e.g., NowSMS, WinSMS, etc.
![Page 8: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/8.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 8
Programming Options
• Protocols– direct via language-specific API– TCP/IP-based protocols
• e.g., CIMD, SMPP, etc.– HTTP-based protocols
• GET, POST, XML-RPC• Languages
– Java, PHP, anything …– Note: probably also need
• backend database• web front-end
![Page 9: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/9.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 9
Legal Disclaimer
• The information here is for educational purposes only
• We assume your programs will be used for private/personal use only
• If you want to do a commercial or high-volume application, you may have to contact a mobile operator or an aggregator in your target market
![Page 10: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/10.jpg)
Lab Examples
![Page 11: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/11.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 11
Writing an App (Easy!)
public interface SMSApplication {
public SMSMessage onSMSMessageReceived(SMSMessage incomingMsg);
public void setSMSSender(SMSSender sender);
}
public interface SMSSender {
public boolean sendSMSMessage(SMSMessage outgoingMsg);
}
IMPLEMENT THIS
![Page 12: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/12.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 12
How to connect your app
• Via Java– via GSM modem adapter
• via SMSLib
– via HTTP GET adapter• connecting from Kannel or other gateways
– (via email adapter)
• Alternative: PHP
![Page 13: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/13.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 13
Other Issues
• Databases
• Web Interface
![Page 14: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/14.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 14
References
• See ict4dlab.org for more info and links
• This is under development, so visit often for up-to-date info
![Page 15: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/15.jpg)
Application Design Tips and Tricks
![Page 16: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/16.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 16
Caveats
• Watch how you keep state
– if you are running app from command-line, state that is not written to disk or persistent database will get lost when you run the app again
– similar issues with web-based solutions
![Page 17: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/17.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 17
Caveats: Security
• Watch for “SQL Injection” attacks!
![Page 18: Lab 1: SMS Services MIT D-Lab ICT4D. D-Lab ICT for Development Lab 1: SMS Services Slide 2 Intro to Lab Sessions Goal: Give overview and examples to jump-start](https://reader035.vdocuments.site/reader035/viewer/2022072010/56649db95503460f94aa8f94/html5/thumbnails/18.jpg)
D-Lab ICT for DevelopmentLab 1: SMS Services
Slide 18
General User-Interface Tips
• Make inputs case-insensitive
• Also whitespace insensitive
• Avoid hard-to-type characters
• Try to use keywords in T9 dictionary (or compound words composed of such words)
• Reply-based interfaces– keep per-user state of last transaction
– enables simpler “Reply with …” commands• e.g., “Reply NEXT to continue to get more info”