MIDlets may need to access and handle native application data, such as contact lists, sensor data, or files stored on the device. Java ME allows MIDlets to handle the following kinds of native data:
The javax.microedition.rms
package of the MIDP 2.0 specification allows you to store persistent data,
such as saved games and high-score tables, and later retrieve the
data. The package does not enable writing or reading data outside
the RMS.
To complement the javax.microedition.rms
package,
the PDA Optional Packages for the J2ME Platform (JSR-75) specification provides two optional APIs that allow MIDlets to create, read, and
write files and directories in the device file system:
The Personal Information Management (PIM) API provides access to PIM databases, such as contact lists, calendars, and to-do lists.
The FileConnection (FC) API provides access to the local device file system, including removable storage media, such as external memory cards, connected to the device. The FC API uses the Generic Connection Framework (GCF).
These two APIs are completely independent of each other, so devices can support either or both.
Central RepositoryThe Central Repository API allows to access the Symbian central repository in the Symbian platform. Using this API, the values stored in the central repository can be read from and written to.
The Mobile Sensor API is an optional API that allows MIDlets to fetch data from the sensors of a mobile device.
The Contactless Communication API is an optional API that allows MIDlets to use the Near Field Communication (NFC) capabilities of the device to communicate with contactless targets, such as other NFC devices or radio frequency identification (RFID) devices.
The following developer's guides are available on data handling:
Describes how to use the FC API, and provides an example MIDlet for browsing and displaying images stored in the device file system.
Personal information management
Describes how to use the PIM API, and provides an example MIDlet for creating and sharing events.
Describes how to use the Mobile Sensor API, and provides example MIDlets for using sensors connections and navigating an image with the accelerometer sensor.
Describes how to use the Contactless Communication API, and provides example MIDlets for communicating with contactless targets.