Table of ContentsChapter 5.            The J2ME APIThe MIDlet Application

MIDP API Overview

All right, you've waded through more introductions than a spinster's ball, so now it's time to get to the meat and potatoes of exactly what you can do with the MIDP API. For an API that covers such little devices, there's a surprising amount of functionality.

Table 5.1 provides an outline of the five significant sections of the MIDP API. As you might have noticed in reviewing the class list included in Chapter 2, the functional grunt of the MIDP API lies in the LCDUI (Liquid Crystal Display User Interface), with some extra help from the Persistence (RMS) and Networking APIs.

Table 5.1. API Sections

Section

Description

Application

Includes the MIDlet class (and friends).

Timers

Includes essentially just the Timer and TimerTask classes.

Networking

Provides access to the (limited) communications capabilities of the device.

Persistence (RMS)

Provides access to device-persistent storage via the Record Management System (RMS) API.

User Interface

Includes the MIDP LCDUI classes.


In the following sections, you'll walk through this functionality and see some examples of the API in action. I'll also try to tell you some practical uses for these tools in developing a real-world game.

    Table of ContentsChapter 5.            The J2ME APIThe MIDlet Application