Sun has submitted JSR 211, Content Handler API, to the JCP. The proposed API enables J2ME applications to handle multi-media and web content, and can give developers and users a seamless and integrated user environment on mobile phones and wireless devices.
The purpose of this JSR is to define an optional package for an API and associated model permitting the invocation of J2ME Applications to handle actions on Uniform Resource Identifiers (URI) based on the MIME-type or scheme. For example, A MIDP MIDlet or a Personal Profile Xlet or main can be registered to handle a MIME type and appropriately display its content. The model will allow the application managment software of the device to control the execution of the applications to conserve resources and to enforce the security policy of the device and the Java runtime.
The functions required are registration, launch based on a URI, and retrieving of resource parameters when launched. Registration allows a packaged J2ME application, for example a MIDlet in a MIDlet suite, to be associated with a type and be invoked from any application to handle a URI. One application can use the URI and/or MIME-type to invoke another application. The interactions between the invoking and invoked applications should allow the applications to run sequentially passing parameters and returning results and perhaps regaining control after the handler exits. Each application executes in the appropriate runtime. In a simple example, a game developer could make available new levels as links on a web page. The linked resource's MIME type would be used on the device to start the game and pass the URI. This provides seamless integration possibilities between browsers and applications. The link could be presented to the user in a message, in a browser, or from another application and the device software would dispatch the matching application.
Registration attributes will be defined for application packaging to allow application installers and provisioning servers to correctly identify and register the application.
This optional package will permit enhanced integration of J2ME applications into a device's application environment; browsers and native applications as well a Java language applications will be able to invoke Java applications which dynamically extend the media types and capabilities supported by the device's application environment.
This definitely is a needed API. The big advantage of native applications is that they have open access to eachother. Although J2ME's security model is much needed as well, it prevents other applications from starting the midlets to handle some kind of content. Whether the content is coming from the internet or from the local storage. Efforts by NTT DoCoMo (in their version of Java), Symbian, Microsoft to provide this kind of functionality turned out to be very successful.
The only company that provide this functionality for J2ME was Sprint and their proprietary Muglet API. It seems like that API was the basis of JSR211, especially since SUN implemented it together with Sprint.
However, I really hope this API will be part of the first MIDP2.0 releases later this year, else the J2ME community might have a hard time keeping up with Symbian, MS etc.