Lab 3: More Phone-Based Techniques MIT D-Lab ICT4D Lab 3: More Phone-Based Techniques Luis F. G. Sarmenta draft 1: 4/10/2008
Recap: What can you do with mobile phones? Computation / logic general-purpose language limited only by processor speed and memory Multimedia Graphics 3D Graphics on new phones Camera Audio / Video recording and playback Connectivity SMS, MMS, Bluetooth, HTTP connect to server-based resources/services connect to other users Other Features NFC / RFID Location / GPS Sensors (e.g., accelerometer)
More References Examples Note: Our lab sessions for this class are only meant to jump-start you and get you on your way. You should read further on your own! Recommended Books Li and Knudsen. Beginning J2ME: From Novice to Professional, Third Edition. Publisher: Apress. (http://www.apress.com/book/view/1590594797) Hamer. Creating Mobile Games. Publisher: Apress. (http://www.apress.com/book/view/1590598806) Examples The Sun Wireless Toolkit has many examples! See also http://java.sun.com/javame/reference/ See also source code downloads available from Apress See also http://www.java-tips.org/java-me-tips/midp/ Some Lecture Notes by others http://eprom.mit.edu/education.html http://web.mit.edu/21w.780/www/spring2007/
More References forum.nokia.com non-Java alternatives SDKs, includes emulators, support for Nokia-specific features non-Java alternatives Symbian “S60” or “Series 60” is a platform version of Symbian “native” code – faster, and more features harder to code in, and less portable Python runs on Symbian-based Nokia phones Pros may be easier to program may provide access to more features Cons limited to Symbian phones not easy to install for end-users
Generic Connection Framework
Connector and Connections Many Features in J2ME MIDP are accessed via the Generic Connection Framework Different classes implementing a subtype of interface Connection HttpConnection MessageConnection (SMS,MMS) SocketConnection StreamConnection etc.
General Pattern Call Connector.open( url ) to get a Connection url specifies connection type Cast Connection to appropriate type Each Connection type has specific methods Open streams (input and output)
Other Features
Camera Part of Media API Camera is played like Video To take photo, get snapshot of Video
Location Location API presents an abstraction Specify Criteria c Then call LocationProvider.getInstance(c);
NFC (Contactless) NFC – Near Field Communications communicate with contactless / “RFID” devices Supported by Nokia 6131 NFC phone and a few others Reading Unique ID is simple You can also send more complex commands to the NFC Download Nokia 6131 NFC SDK from forum.nokia.com Get NFC tags from Rich Fletcher