working on blackberry OS7 9850 device
i am working to Turn on Flash as Light on Blackberry.
i have successfully completed this, but in BBOS6 device 9780 video field is showing; how can i hide that video field?
here is my code
private FlashControl flashControl;
private VideoControl _videoControl;
private Field _videoField;
private ButtonField capture;
private Field videoField;
// Set the displayed title of the screen
public MyScreen(int j) {
try {
Player player = javax.microedition.media.Manager.createPlayer("capture://video?encoding=video/3gpp");
player.realize();
VideoControl videoControl = (VideoControl) player.getControl("VideoControl");
if(videoControl != null)
{
videoField = (Field)videoControl.initDisplayMode( VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field" );
try
{
videoControl.setDisplaySize(1, 1);
}
catch(Exception e)
{
}
//videoControl.setDisplaySize( 0 , 0 );
videoControl.setVisible(true);
videoField.setBackground(BackgroundFactory.createSolidBackground(0x000000));
//videoField.
add(videoField);
flashControl = (FlashControl)player.getControl("javax.microedition.amms.control.camera.FlashControl");
setFlashlight(true);
}
player.start();
} catch (Exception e) {
System.out.println(e);
}
}
private void setFlashlight(boolean b) {
if(b == true){
flashControl.setMode(FlashControl.FORCE);
}
else{
flashControl.setMode(FlashControl.OFF);
}
}
is there any solution, like we can push the screen or video field in the background?