|Oracle® Java Micro Edition Software Development Kit Developer's Guide
Release 3.4 for Eclipse on Windows
JSR 211 defines the Content Handler API (CHAPI). CHAPI specifies a system by which MIDlets can be launched in response to specific types of content.
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.
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 Oracle Java ME SDK installation's
If your workspace is the Oracle Java ME SDK installation's
\apps subdirectory, continue to step 2. If not, follow these steps to create the workspace:
\apps directory in your Oracle 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.4 > Java ME Sample Applications, and click Next.
Right-click a device and select Run Project via OTA > CHAPIDemo.
Not all features of the demo are available if you select the Run command. Additionally, to see certain features of the demo, an HTTP server is required. The server is located in the installdir
\apps directory. Also the audio and video files are located in the content directory, which must be located in installdir
\apps\CHAPIDemo directory (installdir
On the Favorite Links page, select CHAPI Demo.
Press Select or click the Menu soft button and select Go.
You might see a request for permission to use airtime. To speed up the demo interaction, select "Ask once per application use" and select the Yes soft key (if you do not check this option you can still use the demo but you see the airtime message more frequently).
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/dist/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.
Click 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 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.