×
Namespaces

Variants
Actions
Revision as of 09:18, 8 June 2009 by tanjaluodes (Talk | contribs)

How to use auto focus

From Nokia Developer Wiki
Jump to: navigation, search

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: AMMS package support

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);
42 page views in the last 30 days.