MMAPI 1.1, MIDP 2.0 Media API, and Advanced Multimedia SupplementsThe Mobile Media API (MMAPI) is an optional package within the Java 2 Platform, Micro Edition (J2ME), that provides a standard API for rendering and capturing time-based media, such as audio tracks and video clips. Developed within the Java Community process as JSR 135, MMAPI was designed to be flexible and platform-independent; it makes no assumptions about media formats, protocols, or features supported by various devices. MMAPI is already making its way into mobile devices; the Nokia 3650, for example, includes an implementation. Other devices that support MMAPI can be found at "J2ME Devices."
This article services the latest developments in MMAPI: the new security considerations raised in MMAPI 1.1, the differences between MMAPI and the MIDP 2.0 Media API, J2ME Wireless Toolkit 2.2 support for MMAPI, and JSR 234, Advanced Multimedia Supplements. If you're looking for a tutorial on MMAPI as well as code samples, for an audio/video player, for instance, see the articles "The J2ME Mobile Media API" and "Taking Pictures With MMAPI."
Overview of MMAPI ComponentsMMAPI has four main components:
Supported MMAPI Controls
MMAPI has 12 controls, in the package
Be aware that not all MMAPI implementations support all types of controls. You can find out what a device does support by calling
In addition to the properties supported by
MMAPI 1.1MMAPI 1.1 is a maintenance update of MMAPI 1.0. It primarily fixes documentation problems, adds some new definitions, and revises documentation related to the MIDP 2.0 security framework. It makes no changes to classes, interfaces, or method signatures.
The MMAPI specification does not define a security framework of its own, but MMAPI implementations are subject to security mechanisms provided by the underlying profile and configuration. Some MMAPI methods are defined to throw a
The security issues of MMAPI concern recording, network access, and access to local data stores. Recording raises concerns about users' privacy; the application may silently access recording functionality to record and distribute private conversations. In addition, security practices that are in place for accessing remote and local resources must be followed. To gain access to recording functionality, networks, or local data stores, an MMAPI-based application must obtain the appropriate permissions, which are implementation-specific.
MMAPI and the J2ME Wireless Toolkit 2.2
Release 2.2 of the J2ME Wireless Toolkit implements JSR 135. The toolkit comes with an emulator skin,
MMAPI MIDlets
The toolkit also comes with several MMAPI demos. A particularly interesting demo is Pausing Audio Test, which is part of the
![]()
Comparing MMAPI and the MIDP 2.0 Media APIThe MIDP 2.0 Media API is a direct subset of MMAPI, intended for devices with very limited resources running MIDP 2.0 – although the same subset can also be adopted by other J2ME profiles requiring sound support. This API fulfills the requirements set by the MIDP expert group, including:
As a result of these requirements, the MIDP 2.0 Media API differs from MMAPI in several ways:
Comparing MMAPI and Advanced Multimedia SupplementsJSR 135 introduced basic playback functionality for audio and video. JSR 234, Advanced Multimedia Supplements, will support recent hardware innovations by defining an optional package for advanced multimedia functionality. The new APIs will rely on and add to the features of MMAPI in J2ME/CLDC environments. The aim is to offer better support for camera and radio, as well as access to advanced audio processing. Some of the capabilities described in the specification:
Conclusion
The MMAPI optional package provides some nice functionality not previously available to applications running on MIDP-enabled devices. Its extensible architecture creates an opportunity to bring still more capabilities to mobile devices. This article described the main components of the Mobile Media API, discussed the changes in its 1.1 release, and explained the relationships between MMAPI, the MIDP 2.0 Media API, and the Advanced Multimedia Supplements. If you'd like to see MMAPI in action, download the J2ME Wireless Toolkit 2.2 and explore the projects For More Information
AcknowledgmentsSpecial thanks to Vincent Hardy of Sun Microsystems, whose feedback helped me improve this article.
About the AuthorQusay H. Mahmoud provides Java technology consulting and training services. He has published dozens of articles on Java mobile technology, and is the author of Distributed Programming with Java (Manning Publications, 1999) and Learning Wireless Java (O'Reilly, 2002).
Back To Top | |||||||||||||||||||||||
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.
|
| ||||||||||||