|Oracle® Java Micro Edition Software Development Kit Developer's Guide
Release 3.2 for Eclipse on Windows
JSR 211 defines the Content Handler API (CHAPI). The basic concept is that MIDlets can be launched in response to incoming content (files). Modern mobile phones can receive content using SMS, infrared, Bluetooth, e-mail, and other methods. Most content has an associated content type. CHAPI specifies a system by which MIDlets can be launched in response to specific types of content.
In the Oracle Java ME SDK Content Handlers are integrated in an Eclipse project as application descriptors. Content Handlers you define are packaged with the application.
For the demo to work this project must reside in the Java ME SDK installation's
If your workspace is the Java ME SDK installation's
\apps subdirectory, continue to step 2. If not, follow these steps to create the workspace:
\apps directory in your Java ME SDK platform installation. For example,
In Eclipse, select File > Switch Workspace > Other.
Browse to the
\apps directory, and click OK.
Select File > New >Project... and in the New Project window, select Examples > Java ME SDK 3.2 > Java ME Sample Applications, and click Next.
Run the project.
On the Favorite Links page, choose CHAPI Demo.
Press Select or choose the menu soft button and choose Go.
The Text Viewer displays a Media Player URL and links to various media files.
Install the Media Player to view media.
Click the URL
http:handlers/MediaHandler.jad, or, use arrow keys to highlight the URL and from Menu, select Go.
The application asks, "Are you sure you want to install Media Handler?" Click the Install soft key.
An authorization Information screen is displayed.
Press the Install soft key.
The installation is confirmed. When the installation completes, you are returned to the Text Viewer. The Media Handler is shown as a separate application in the AMS.
Select and view the different image, video, audio and text URLs.
Click on a link to open that media in the viewer, or, use arrows to highlight the link, then select Go from the soft menu.
Select the Back soft key to return to the Text Viewer.