Taking pictures

You can take a picture on a BlackBerry® device by using the javax.microedition.media.Player class and the associated VideoControl interface in your BlackBerry device application. When you create an instance of the Player class, you can specify the appropriate file encoding and resolution of the picture.

You can invoke VideoControl.getSnapshot() to take the picture. The image is returned as a byte array (the unprocessed image), which you can display on the device, save to a file, or process as required.

To create a viewfinder to monitor the picture the camera is taking, you can invoke VideoControl.initDisplay() to retrieve a Field object that is added to your UI.


Was this information helpful? Send us your comments.