×
Namespaces

Variants
Actions
Revision as of 13:30, 18 July 2012 by hamishwillee (Talk | contribs)

How to take snapshot using JSR234

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: senthilat (30 Jun 2007)
Last edited: hamishwillee (18 Jul 2012)
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");
snapshotControl.start(1);

Refer to the API documentation for further details on the use of SnapshotControl. Basically, the argument of start is the maximum number of pictures to be taken.

36 page views in the last 30 days.
×