Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0

Get PDF Book Print View

Document Information

Getting Started

Java ME Platform SDK Features

Using Sample Projects

Creating and Editing Projects

Viewing and Editing Project Properties

Running Projects in the Emulator

Searching the WURFL Device Database

Finding Files in the Multiple User Environment

Profiling Applications

Monitoring Network Traffic

Lightweight UI Toolkit

Security and MIDlet Signing

BD-J Support

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator

On-device Debugging

Command Line Reference

Logs

JSR Support

JSR 75: PDA Optional Packages

FileConnection API

PIM API

Running PDAPDemo

Browsing Files

The PIM API

JSR 82: Bluetooth and OBEX Support

JSR 135: Mobile Media API Support

JSR 172: Web Services Support

JSR 177: Smart Card Security (SATSA)

JSR 179: Location API Support

JSRs 184, 226, and 239: Graphics Capabilities

JSR 205: Wireless Messaging API (WMA) Support

JSR 211: Content Handler API (CHAPI)

JSR 238: Mobile Internationalization API (MIA)

JSR 229: Payment API Support

JSR 256: Mobile Sensor API Support

Index

Browsing Files

To run the file browser, you’ll need to give the MIDlet appropriate security authorization, if you have not already done so. Right-click on your project, choose Properties, and select Specify the Security Domain. If necessary, select the maximum domain and press OK.

Now open and run the PDAPDemo project. Launch the FileBrowser MIDlet. You see a directory listing, and you can browse through the available directories and files. By default there is one directory, root1. This directory is located at USER_HOME/javame-sdk/3.0/work/emulator-instance/appdb/filesystem/root1.

FileBrowser MIDlet displaying root1 directory

Select the directory and press the View soft button to enter it.

The directories photos and private are empty by default. You can add files and root directories and they will be visible to the JSR 75 File API. See JSR 75: PDA Optional Packages for more information. (This demo shows a README and some JPEGs that were added to the local photos directory.)

File Browser midlet displaying contents of root1 directory

Using the Menu commands you can view a file or see its properties. Try selecting the file and choosing Properties or View from the menu. Here we view README.txt:

Readme file viewed on left, and properties viewed on right