Example: Accessing files on the device

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

Note: There are some restrictions on the applicable size of images used in this kind of example. For more information, see article Memory Usage: Images in the Nokia Developer Wiki.

Prerequisites

You need the following to develop and test this MIDlet:

  • Series 40 3rd Edition or S60 2nd Edition FP2 SDK or newer

    Note: The Series 40 full touch version of the MIDlet requires Nokia SDK 2.0 for Java or newer.

  • Series 40 3rd Edition or S60 2nd Edition FP2 device or newer

    Note: The Series 40 full touch version of the MIDlet requires a Java Runtime 2.0.0 for Series 40 device or newer.

For instructions on how to set up the Java ME development environment, see section Setting up the development environment.

Development

For more information about the MIDlet, see:

  • Design for information about the design and functionality of the MIDlet

  • Implementation for instructions on how to implement the MIDlet

You can download the project files for the MIDlet from the download page.