×
Namespaces

Variants
Actions

How to take snapshot using JSR234

From Nokia Developer Wiki
Jump to: navigation, search

This article demonstrates how to take a camera snapshot using AMMS (JSR 234).

Article Metadata
Article
Created: senthilat (30 Jun 2007)
Last edited: hamishwillee (13 Aug 2013)
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.

This page was last modified on 13 August 2013, at 13:53.
51 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.

×