The Content Handler API (CHAPI) defined in JSR-211 allows an application to invoke registered applications by URL, by content type, or by content handler ID. The application can use actions provided by the handler on the invoked content. For example, an image-viewing MIDlet can be registered to handle the MIME type image/png. Other applications can then request the handler to display the image.
The API is supported in Nokia Asha and Series 40 software platform devices with clarifications detailed in the Content Handler API (JSR-211): Implementation Notes. The API was introduced in Series 40 5th Edition and Feature Pack 1.
The handler can provide multiple actions that control how the content is displayed, modified, or returned. The execution model utilizes the Application Management Software (AMS) of the device to provide a smooth user experience, to control the execution of the applications, to conserve resources, and to enforce the security policy of the device and the Java™ runtime environment.
The Content Handler API includes functions to:
Invoke a content handler and get a response
Register an application as a content handler
Respond to an invocation
Registration allows a MIDlet to be associated with one or more content types and to be invoked from other applications to handle content. Multiple content handlers can be registered for the types, suffixes and actions. An application can use the URL, type, ID, or action to invoke the content handler. The handler to be invoked is selected based on the type, ID, and action requested.
The block diagram below indicates general relationships between the CHAPI package, the native operating system (OS), the Java Runtime Environment (Configuration and Profiles), and other optional packages that may be present in a device.
Figure 1. Java environment for Content Handler API
Content Handler API use cases can be roughly divided into two categories:
Distributing content with a proprietary file extension that a MIDlet uses.
Assigning established content types to a specific application.
More defined use cases include:
Distributing new game levels
Upgrading software with new features
Invoking content stored on the device
Invoking a specific application
Getting an email address from a local or remote phone book
Last updated 11 December 2013
We appreciate your feedback.