tags:

views:

251

answers:

2

I have a SE W660 and I would like to take a snapshot from the 3G camera (which is on the front, and not on the back).

Is there any way to do that?

+2  A: 

I don't have access to that device right now. But JSR135 lets you find out all the possible capture options by calling Manager.getSupportedContentTypes("capture"). This will return a string array of capture types. You can then try each one in turn (using Manager.createPlayer("capture://" + <capture string>)) and see if one of them corresponds to the front camera.

If it helps, on Nokia S60 the strings "capture://devcam0" and "capture://devcam1" provide access to the main and secondary cameras respectively.

Hope this helps.

funkybro
A: 

It goes something like this:

Player player = Manager.createPlayer("capture://video");
player.realize();
VideoControl vc = (VideoControl) player .getControl("VideoControl");
player.start();
byte[] imageData = vc.getSnapshot(null);
Image snapshot = Image.createImage(imageData, 0, imageData.length);

some more info here

Orr Matarasso