Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Series 40 6th Edition: Accessing Camera Capability with Advanced Multimedia Supplements API (JSR-234)

From Wiki
Jump to: navigation, search
Article Metadata
Tested withCompatibilityArticle
Created: r2j7 (12 Mar 2009)
Last edited: hamishwillee (29 Jul 2013)

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:

  • 3D Audio: javax.microedition.amms.control.audio3d
  • Music:javax.microedition.amms.control.audioeffect

Support for Camera Capability controls in Series 40 6th Edition

In addition in Series 40, support for AMMS Camera Capability subpackage,, 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:

  • the minimum set of Camera controls supported by Series 40 6th Edition devices includes:
    • CameraControl:
    • SnapshotControl:
  • the maximum set of Camera controls supported by Series 40 6th Edition devices includes:
    • CameraControl:
    • FlashControl:
    • FocusControl:
    • SnapshotControl:
    • ZoomControl:

  • The supported set of Camera controls for each Series 40 device with AMMS API (JSR-234) can be checked with the search engine for device specifications on Nokia Developer web site. To check the support, select a device and click 'APIs' to open the API info box. For JSR 234 Advanced Multimedia Supplements 1.1 (camera) of the device, the 'Notes' row on the bottom of the 'APIs' info box defines either one of the following set of Camera controls supported by the device:
    • contains CameraControl, SnapshotControl
    • contains CameraControl, SnapshotControl, FlashControl, FocusControl and ZoomControl
  • support for ExposureControl (javax.microedition.amms.control.ExposureControl) is not enabled in Series 40 6th Edition

Using Camera Capability controls in Series 40 6th Edition

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”);

For implementing Camera controls, the related classes need to be imported for application:

//Imports all classes for the existing Camera controls
// 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("");
SnapshotControl snapshotCntrl =
(SnapshotControl) player.getControl("");
FlashControl flashCntrl =
(FlashControl) player.getControl("");
FocusControl focusCntrl =
(FocusControl) player.getControl("");
ImageFormatControl imageCntrl =
(ImageFormatControl) player.getControl("javax.microedition.amms.control.ImageFormatControl");
ZoomControl zoomCntrl =
(ZoomControl) player.getControl("");

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 Nokia Developer’s Library:


This page was last modified on 29 July 2013, at 08:19.
39 page views in the last 30 days.