×
Namespaces

Variants
Actions

How to use auto focus

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: senthilat (30 Jun 2007)
Last edited: hamishwillee (29 Jul 2013)

Note, that the camera-related AMMS controls (javax.microedition.amms.control.camera package) are partially supported only on Series40 6th edition devices (but only with "capture://image" players)

To check which AMMS packages are implemented on Nokia devices you can check this page on Java ME Developer's Library: Supported APIs

player = Manager.createPlayer("capture://video");
player.realize();
videoControl = (VideoControl)player.getControl("VideoControl");
videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, <your canvas>);
videoControl.setDisplayLocation(0,0);
videoControl.setDisplaySize(176,208);
snapshotControl = (SnapshotControl)player.getControl("javax.microedition.amms.control.camera.SnapshotControl");
focusControl = (FocusControl)player.getControl("javax.microedition.amms.control.camera.FocusControl");
focusControl.setMacro(true);
snapshotControl.start(1);
This page was last modified on 29 July 2013, at 11:06.
81 page views in the last 30 days.
×