Namespaces

Variants
Actions

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 over the next few weeks. Thanks for all your past and future contributions.

How to take continuous camera snapshot using Java ME

From 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 08:10.
54 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.

×