This example MIDlet shows you how to use the features of the FileConnection API (FC API) to navigate the device file system and access files. The features are demonstrated in the context of a basic image viewer MIDlet, which implements a file browser for navigating the device file system and selecting images to view on the device screen.
Figure: Viewing an image
For a tutorial that shows you how to create this MIDlet, see section Example: Accessing files on the device.
This MIDlet is provided in two versions:
The regular version is compatible with Series 40 3rd Edition and S60 2nd Edition FP2 devices and newer.
The Series 40 full touch version is only compatible with Java Runtime 2.0.0 for Series 40 devices and newer.
This MIDlet has been tested on the following devices:
Nokia 6280 (Series 40 3rd Edition)
Nokia Asha 305 (Java Runtime 2.0.0 for Series 40)
The MIDlet project files are packaged as a zip file. The zip file includes two projects: the regular version and the Series 40 full touch version. To download the zip file, click the following link:
The MIDlet consists of the following classes (click to view the full source code):
Note: The source code is from the Series 40 full touch version of the MIDlet. To view the source code of the regular version, see the source code files in the zip file.