This example MIDlet suite shows you how to use the Content Handler API on Series 40 devices to:
Handle content locally in a MIDlet
Invoke content in an external content handling application
Register an application as a content handler
This example also shows you how to define the correct JAD attributes for content handling.
Figure: ContentHandler MIDlet suite
Note: From Java Runtime 2.3 for Symbian onwards, the Symbian platform provides limited support for the Content Handler API: it is possible to pass content from a MIDlet to a native content handler, that is, a native Symbian application. MIDlets cannot themselves function as content handlers. In the present example, therefore, invoking the native content handler for an image file is the only part of the MIDlet suite that would work on a Symbian device. The audio and text handling functions do not work, since it is currently not possible for a Symbian MIDlet to receive content from itself, another MIDlet, or a native application.
For a tutorial that shows you how to create this MIDlet, see section Example: Handling audio, image, and text content.
This MIDlet is compatible with Series 40 5th Edition FP1 devices and newer.
This MIDlet has been tested on the following device:
Nokia Asha 311 (Java Runtime 2.0.0 for Series 40)
Nokia C3-00 (Series 40 6th Edition)
Nokia X3-02 (Series 40 6th Edition FP1)
The MIDlet project files are packaged as a zip file. To download the zip file, click the following link:
The MIDlet consists of the following packages and classes (click to view the full source code):
com.nokia.example.contenthandler.audiohandler
com.nokia.example.contenthandler.texthandler