Advanced Multimedia Supplements API (AMMS) (JSR-234) builds on the framework established in the Mobile Media API (MMAPI) (JSR-135) by adding many new Controls in javax.microedition.amms.control and it’s subpackages. In Nokia platforms, the support for AMMS has been partially enabled as subpackages. More specifically, both Series 40 (starting from Series 40 5th Edition) and S60 (starting from S60 3rd Edition, Feature Pack 1) include support for two full Control subpackages:
In addition in Series 40, support for AMMS Camera Capability subpackage, javax.microedition.amms.control.camera, is introduced starting from Series 40 6th Edition.
The support for the Camera subpackage is partial as some Series 40 6th Edition devices support two of six Camera controls, and in addition, one of the controls, ExposureControl, is excluded from Series 40 6th Edition. In addition to the controls of Camera subpackage, the support for ImageFormatControl is included for setting image format of camera images (This control is the precondition for using Camera subpackage as defined by JSR 234 specification).
More specifically, support for the Camera subpackage in Series 40 6th Edition stands for:
Accordingly to JSR 234 specification, the Camera controls can be provided by using a MMAPI Player object. For Series 40 devices, the Player object for camera capture can be created as follows:
//NOTE: Series 40 specific locator for camera capture
Player player = Manager.createPlayer(“capture://image”);
player.realize();
For implementing Camera controls, the related classes need to be imported for application:
//Imports all classes for the existing Camera controls
import javax.microedition.amms.control.camera.*;
// For controlling the setting of the image format
import javax.microedition.amms.control.ImageFormatControl;
The created Player object can provide supported Camera controls and ImageFormatControl by using getControl():
CameraControl cameraCntrl =
(CameraControl) player.getControl("javax.microedition.amms.control.camera.CameraControl");
SnapshotControl snapshotCntrl =
(SnapshotControl) player.getControl("javax.microedition.amms.control.camera.SnapshotControl");
FlashControl flashCntrl =
(FlashControl) player.getControl("javax.microedition.amms.control.camera.FlashControl");
FocusControl focusCntrl =
(FocusControl) player.getControl("javax.microedition.amms.control.camera.FocusControl");
ImageFormatControl imageCntrl =
(ImageFormatControl) player.getControl("javax.microedition.amms.control.ImageFormatControl");
ZoomControl zoomCntrl =
(ZoomControl) player.getControl("javax.microedition.amms.control.camera.ZoomControl");
The returned Camera controls can be now used for accessing and setting control specific Camera capabilities.
For using the Camera capabilities, please see the Javadocs of JSR-234 AMMS API in Forum Nokia Developer’s Library: http://library.forum.nokia.com/index.jsp?topic=/Java_Developers_Library/GUID-D3E35E6F-0C45-48ED-B09D-F716E14C1C02/javax/microedition/amms/control/camera/package-summary.html
No related wiki articles found