×
Namespaces

Variants
Actions

How to take continuous camera snapshot using Java ME

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

Note, that the camera-related AMMS controls (from 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);
 
//The number of snapshots needed can be given in the snapshotControl.start(<your no>);
snapshotControl.start(5);
This page was last modified on 29 July 2013, at 11:10.
46 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×