An Introduction to Mobile Phone Application Development in Java

Instructors:

 

Nathan Eagle, PhD

Visiting Lecturer and Research Scientist

Massachusetts Institute of Technology

University of Nairobi

 

What is this course about?

 

The primary goal of this course is to introduce you to specific Java libraries (typically referred to as J2ME or MIDP) that are extremely useful for quickly developing applications for mobile devices such as phones and PDAs. This course does not cover the fundamentals object-orient programming languages such as Java. Rather, this is an applied Java class that will provide you with sufficient background to write applications that will run on mobile phones.

 

Roughly speaking, the first third of this course will be an introduction to the Java 2 Micro Edition (J2ME) and J2ME programming. These three initial courses will give you an overview of the J2ME, and quickly teach you everything you need to know to get started with J2ME programming. In the second part of the course, we will describe programming details of the MIDP, including how to program the phone interface, handle events, make network connections, and work with databases. Finally, during the last third of the course, you will form teams of three or four and work on your own independent project. The examples presented throughout the course will provide a good starting point for the project, which can involve many MIDP features, including user interface, networking, and databases. The goal for the project will be to develop a MIDlet and subsequently convert it into an executable mobile phone application for devices supporting MIDP2.0 or higher. While the only project requirement is for the application to be novel and non-trivial, teams will be graded on their application’s scope, ambition, creativity, and relevance to Kenyan mobile phone users.

 

This is a lot of stuff to cover in 9 weeks, and you can expect the pace to be frantic at times. But I hope that you will find, as we have, that this stuff, mobile phone programming, is a blast.

 

What do I need to know before taking this course?

 

We assume that you are familiar with Java programming and have worked with the J2SE classes. In addition, we assume that you are familiar with setting up Java to work under various environments (Windows or Unix platforms), as well as compiling and running Java applications.

 

Suggested Textbook:

 

Topley, Kim, J2ME in a Nutshell, O'Reilly and Associates, Inc., Sebastopol, California, 2002, 478 pages, ISBN 0-596-00253-X.

 

While there is no required textbook to purchase, we will be using Topley’s J2ME in a Nutshell as the source of reading assignments which we will post on the course website (password protected). This book is well organized and provides ample treatment of most of the topics that we will cover this term. You will find that the illustrations and code fragments are an excellent supplement to the materials covered in the lectures. The first part is a comprehensive introduction to the J2ME language for anyone with previous J2SE experience. The second part of the book is largely a reference manual and documentation of the APIs associated with J2ME. Reading assignments will accompany the lecture notes, and be placed on the web in PDF format. You may read the course materials either before or after the lecture that they are associated with. All reading assignments will be considered fair game for inclusion on the mid-term and final exams, whether or not the material was covered in class.

 

Depending on your previous experience you might find other J2ME books more useful. I also like Learning Wireless Java, by Qusay Mahmoud (O’Reilly, 2001, ISBN 0-596-00243-2) as a text for more advanced computer scientists. It has lots of good examples and thoughtful discussions, although not great as a reference manual.

 

Grading:

 

      

      Programming Projects (4 of 5 with the lowest dropped)...    40%

      Mid-term Quiz................................................................... 10%

      Final Examination.............................................................. 20%

      Team Project.......................................................................           30%

 

Schedule:

 

Week 1

 

We begin by introducing the J2ME environment and explaining configurations and profiles. In addition, you will be shown how to set up the J2ME Wireless Toolkit to compile, preverify, and run a simple MIDlet using the command line with the Wireless Toolkit emulator.

 

Week 2

 

This week we discuss the CLDC, including its requirements, limitations, and the differences between its classes and the classes of the J2SE. In addition, we will look briefly at the standalone CLDC and KVM distribution.

 

Week 3

 

This week introduces the requirements, limitations, and classes of the MIDP, as well as introducing MIDlets and their associated Java Application Descriptor (JAD) files.

 

Week 4

 

We pick up where we left off, explaining the MIDlet lifecycle methods, the Java application manager, and showing how to use the KToolbar application inside the J2ME Wireless Toolkit to simplify MIDlet development. We also discuss how to deploy MIDlets and include step-by-step instructions on how to download a MIDlet into a Nokia Series 60 MIDP-enabled phone.

 

Week 5

 

We introduce the MIDP GUI model and its associated classes during this week. In addition, we will give detailed coverage of both the high-level and low-level MIDP GUI APIs.

 

 

 

Week 6

 

This week continues the discussion of the MIDP GUI APIs by describing how various events take place surrounding the graphical components and commands. In addition, we cover the CommandListener and ItemStateListener interfaces, as well as low-level event handling. Teams for the final project should now have formed.

 

Week 7

 

We now will be able to discuss the Generic Connection Framework provided by the CLDC and show how to implement an HTTP connection across the Internet, using a MIDlet. We also will include examples of how to send data to CGI scripts and Java servlets across a network. Finally, we’ll briefly discuss wireless session tracking and security for MIDlet data traveling across the airwaves.

 

Week 8

 

This week introduces the concept of data stores, which are simple databases that MIDP applications can use to store persistent data beyond the lifetime of the MIDlet that created them. In addition, we demonstrate a MIDlet that can be used to download real-time vegetable prices from a remote web site.

 

Week 9

 

We conclude this course with team project presentations. The best project will selected by the class and the application will sent to Nokia for review. This winning application will be considered for a spot in a future software suite designed to customize Nokia phones specifically for the African market.

 

Python Java SMS Mobile Phone Programming for Entrepreneurs