Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>the problem relevant to the flash control has been resolved by me</p> <p>as per i am using the flash control on my recent application on</p> <p>camera.</p> <p>Here is the code which i used :</p> <pre><code>public Camera(int j) { k = j; try { Player player = Manager.createPlayer("capture://video"); player.realize(); _videoControl = (VideoControl) player.getControl("VideoControl"); flashControl = new FlashControl() { public void setMode(int mode) { // TODO Auto-generated method stub } public boolean isFlashReady() { // TODO Auto-generated method stub return false; } public int[] getSupportedModes() { // TODO Auto-generated method stub return null; } public int getMode() { // TODO Auto-generated method stub return 0; } }; flashControl = (FlashControl) player .getControl("javax.microedition.amms.control.camera.FlashControl"); try { if (k == 1) { flashControl.setMode(FlashControl.AUTO); Dialog.alert("slect Auto"); } else if (k == 2) { flashControl.setMode(FlashControl.OFF); Dialog.alert("slect No"); } } catch (Exception e) { System.out.println(e); } if (_videoControl != null) { _videoField = (Field) _videoControl.initDisplayMode( VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field"); // _videoControl.setDisplaySize(330, 420); // _videoControl.setDisplayLocation(getContentWidth(), // getContentHeight()); _videoControl.setVisible(true); add(_videoField); capture = new ButtonField("Capture", Field.FIELD_HCENTER); capture.setChangeListener(this); add(capture); player.start(); } } catch (Exception e) { System.out.println(e); } } </code></pre> <p>this logic has been implemented simultaneously with Pinkesh as my colleage</p> <p>in the comapny</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload