This code is used by me for image capture in LWUIT, this works fine in Nokia X2 but for other mobile it shows the following error:
javax.microedition.media.mediaexception: unable to realize initialize failed.
Kindly look into the code :
vc = VideoComponent.createVideoPeer("capture://image");
player = (Player) vc.getNativePeer();
// vc.setPreferredH(200);
// vc.setPreferredW(320);
player.realize();
player.prefetch();
videoControl = (VideoControl)player.getControl("VideoControl");
I think this could be useful for you:
How to capture images using LWUIt VIdeoComponent
Here you can find an explanation to how can you capture images with a VideoComponent