Java Reference
In-Depth Information
You can try out the application. Enter in a user name and a password, and then click the
Save button. You can then exit the MIDlet. When you start the MIDlet again, the persisted
information should be redisplayed.
Tip
If you are using the default phone emulator of the J2ME Wireless Toolkit 2.x, the file systems are actually
subdirectories under the
appdb\DefaultColorPhone\filesystem
directory. You should be able to find
the
preferences.pfs
file storing the preference under the
root1
subdirectory.
■
PIM Optional Package
Many devices, especially phones, have the ability to maintain lists of phone numbers and names.
Some devices also store addresses, e-mails, events, to-do lists, and other personal information.
This PIM data is stored in PIM databases. Most devices will have built-in applications that
manage the PIM data. Until recently, there was no direct way of accessing this information
from your MIDP application. A device vendor may now expose access to its PIM databases
through the PIM Optional Package, specified in JSR 75.
Figure 9-2 shows the hierarchy of major classes and interfaces in the PIM API.
Figure 9-2.
The major classes and interfaces of the JSR 75 PIM API
In Figure 9-2, PIM is a singleton object that is used to open lists of records. Think of PIM
as representing the PIM database. Lists are accessed through the
PIMList
interface. Each list
contains items. Each item represents a single record in the PIM database. Items are accessed
through the
PIMItem
interface.
Contact
,
Event
, and
ToDo
all inherit from
PIMItem
, while
ContactList
,
EventList
, and
ToDoList
all inherit from
PIMList
.
Search WWH ::
Custom Search