unable to invoke camera device of sony ericssion p900 mobile using J2ME application
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rajiv_Kumar
Posted On:   Tuesday, September 4, 2007 08:50 AM

I am using Sony Erricsson p900 BUT UNABLE TO INVOKE CAMERA USING j2me PLZ HELP ME ...I am sending my code plz check it or send me some useful code for invoking camera of sony ericssion p900 .............thanx in advance. private void showCamera() { try { System.out.println("snapshot working1"); mPlayer = Manager.createPlayer("capture://video"); this.mPlayer.prefetch(); this.mPlayer.realize(); this.mVideoControl= (VideoControl) this.mPlayer.getControl("VideoControl"); if(mVideoControl == null) throw new MediaExcep   More>>

I am using Sony Erricsson p900 BUT UNABLE TO INVOKE CAMERA USING j2me PLZ HELP ME
...I am sending my code plz check it or send me some useful code for invoking camera of sony ericssion p900
.............thanx in advance.



			


private void showCamera()


{

try {



System.out.println("snapshot working1");

mPlayer = Manager.createPlayer("capture://video");



this.mPlayer.prefetch();

this.mPlayer.realize();

this.mVideoControl= (VideoControl)
this.mPlayer.getControl("VideoControl");


if(mVideoControl == null)

throw new MediaException("No VideoControl!!");


this.canvas = new CameraCanvas(this,mVideoControl);


canvas.addCommand(mBackCommand);

canvas.addCommand(mCaptureCommand);

canvas.setCommandListener(this);

this.mVideoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,canvas);

this.mDisplay.setCurrent(canvas);

this.mVideoControl.setVisible(true);

this.mPlayer.start();


} catch (IOException ioe) {

handleException(ioe);

} catch (MediaException me) {


handleException(me);

}

}
   <<Less
About | Sitemap | Contact