Thick Mobile Client Programming Technologies: Python for S60 and J2ME

Instructors:
Vidya Setlur, Nokia Research Center, Palo Alto, CA
Rich Hankins, Nokia Research Center, Palo Alto, CA

Tutorial Description:
The popularity of mobile systems is increasing with the rapid expansion of the mobile electronics market and its migration from text-based applications to richer thick client applications. The usages of mobile APIs for web access, context awareness through GPS and bluetooth, and real-time graphics are becoming more popular for facilitating various mobile-based services, advertising and gaming. This course will introduce attendees to two main mobile programming technologies for easily building such thick client applications - Python for S60 (PyS60) and Java 2 Platform, Micro Edition (J2ME).

Objectives:
The tutorial will first introduce PyS60 and J2ME, their respective main APIs, and how to set up a programming environment to develop applications in each of these programming languages. While we will provide an overview of the available modules for PyS60 and J2ME, along with their differences and similarities, we will also describe in more detail some specific application topics. These include location-based services, social networking based web services, and interaction over bluetooth. While describing the mechanics of these demos we will also incorporate topics related to common practical challenges in mobile development, namely how to set up an efficient development environment and how to test and debug code on the device. We will also talk about some common issues unique to mobile development, including power, security and user interfaces. The tutorial consists of lectures, demonstrations and hands-on exercises. The attendees will be lent modern smartphones that they can use during the duration of the tutorial. During the breaks and group exercises, we will help the attendees set up a development environment on their own laptop, so that they can do hands-on exercises with the handset. Therefore it is recommended for attendees to bring a laptop.

Intended Audience:
This is an intermediate level tutorial. It is intended for people interested in learning mobile application development. Participants should be comfortable in general programming, while knowledge of Python and Java is a plus.

Audience & Benefits:
  • For developers and designers: The course will give challenging, fresh perspectives on the goals of and approaches to mobile programming and the associated APIs.
  • For industrial and academic researchers: The course will provide provoking questions about the form and function of effective mobile programming practices.
  • For students: People engaged in graduate studies in the mobile area will benefit from learning useful tools in developing concept and prototype systems.

Presentation:
Interactive lectures, demonstrations and hands-on exercises.

Features and Topics Covered:
The tutorial consists of an introduction to PyS60 and J2ME, followed by three core application demonstrations for location-based services, web/social networking and bluetooth interaction. The tutorial concludes with a discussion of general Symbian related issues.

  • Introduction to PyS60 and J2ME:
  • The first section introduces PyS60 and J2ME as mobile programming languages for thick clients, motivating them as platforms for research and application development. We briefly describe the basic concepts of Python and PyS60, so that no previous experience with the Python programming language is required. We also introduce J2ME, JVM, lifecycle of MIDlets, and Java Specification Requests (JSRs).
  • Location-Based Services:
  • Location-based services provide mobile device users personalized services tailored to their current location. They open a new market for value-added services such as traffic advisor, restaurant finder or an emergency service. This section will cover a map based application showing points of interest based on the device’s current location, implemented both in PyS60 and J2ME. This section focuses on the two location APIs in PyS60: the GPS module and the GSM cell id module. We will show how to obtain a developer certificate that grants access to these restricted modules. In addition we demonstrate a small but fully functional GPS-based map application based on Yahoo Maps. This example also introduces usage of a web service which is the main topic of the next section. For the J2ME part, we will discuss the Location API (JSR 179), a set of generic APIs that can be used for developing location-based services. We will discuss various positioning methods - the mobile phone network (cell ID) and satellites (GPS), along with other parameters that influence the degree of location accuracy needed for an application. We will also cover the concept of ’landmarks,’ which is a user generated device-based database that can be shared among all J2ME applications.
  • Web Services:
  • The combination of Web services and the mobile handset is often ideal for context-aware applications. PyS60 and J2ME have APIs that make it extremely easy to access Web-based services and make them aware of the user’s current physical and social context. A demo will show the user can take photos and upload them instantly to his / her Flickr account using the Flickr Web API. This example also demostrates usage of the camera API. For the PyS60 part, we also introduce common concepts in Web APIs and how related techniques, such as JSON and XML, are used in PyS60. In the latter part of this section we show how to build custom client-server applications, especially focusing on research settings. We show various ways to move data from the handset to the server, from SMS and MMS to raw TCP/IP and HTTP. In this context we will also cover concurrency and asynchronous communication using threads and active objects.
  • Bluetooth Interaction:
  • In this section, we will show how to use Bluetooth to communicate with various devices, including registering service, device discovery and communication protocols used (RFCOMM, L2CAP and OBEX). We will also show how the same communication mechanism based on Bluetooth RFCOMM may be used to communicate with a PC or with an external GPS. In J2ME, we will introduce bluetooth interaction in the context of a 2 player mobile arcade game. The game API provides classes (e.g. Sprites, Layers, GameCanvas) that enable developers to build rich gaming content for wireless devices. We will also cover various aspects J2ME’s bluetooth API (JSR 82) used in conveying the players’ game moves between the devices.
  • Symbian Platform:
  • In this final section we will cover some issues related to the Symbian operating system which has over 60% share of the smartphone market. We introduce platform security and the capability model. We describe different options for mandatory digital signing and cases where self-signing is sufficient. In the latter part of the section we will briefly explain how PyS60 can be freely extended using Symbian C++.

Instructor Background:
Vidya Setlur is a research scientist in the User Interfaces Group, at Nokia Research Center, Palo Alto. Her work at Nokia involves researching novel rendering algorithms particularly targeted for mobile computational devices for enhancing visual communication. She has taught several courses at local universities such as San Jose State University and Carnegie Mellon West and academic conferences, regarding the usage of mobile technologies in contextually enhanced mobile applications. Vidya has a PhD in computer graphics from Northwestern University.
Web page

Richard Hankins is a Member of the Research Staff at Nokia Research Center in Palo Alto. His current research focus is on large-scale data management systems for mobile services. Before joining Nokia Research Center in 2006, he was a member of the Micro-architecture Research Lab at Intel, where he investigated future multi-core architectures. Richard has a Ph.D. in Computer Science from the University of Michigan, with a focus on architecture-conscious database systems.
Web page