How do I turn on the Flash

Hi everyone, I am looking for a solution for 2 days and I can not solve the problem.

I am trying to turn on the flash on my camera, a 9700, but nothing happens. Can you help me?

/**
 * HelloWorld.java
 *
 * Copyright © 1998-2010 Research In Motion Ltd.
 *
 * Note: For the sake of simplicity, this sample application may not leverage
 * resource bundles and resource strings.  However, it is STRONGLY recommended
 * that application developers make use of the localization features available
 * within the BlackBerry development platform to ensure a seamless application
 * experience across a variety of languages and geographies.  For more information
 * on localizing your application, please refer to the BlackBerry Java Development
 * Environment Development Guide associated with this release.
 */

package com.rim.samples.device.helloworlddemo;
//package com.rim.samples.device.camerademo;
//import lsphone.flash.microfireps;

import java.util.Vector;

//import java.lang.*;
import java.util.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.system.*;
import net.rim.blackberry.api.invoke.*;

import javax.microedition.media.Manager;
import javax.microedition.media.Player;
import javax.microedition.media.control.VideoControl;

import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.MenuItem;
import net.rim.device.api.ui.component.RichTextField;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.util.StringUtilities;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.*;
import java.util.Vector;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.media.*;
import java.io.*;
import net.rim.device.api.system.Alert;
import net.rim.device.api.system.LED;
import javax.microedition.media.Manager;
import javax.microedition.media.Player;
import javax.microedition.media.control.VideoControl;
import javax.microedition.media.*;
import javax.microedition.amms.control.camera.*;
import javax.microedition.amms.control.*;
import javax.microedition.media.Manager.*;
import java.util.Vector;

import javax.microedition.media.Manager;
import javax.microedition.media.Player;
import javax.microedition.media.control.VideoControl;

import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.MenuItem;
import net.rim.device.api.ui.component.RichTextField;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.util.StringUtilities;

public class HelloWorldDemo extends UiApplication
{
    public static void main(String[] args)
    {
        HelloWorldDemo theApp = new HelloWorldDemo();
        theApp.enterEventDispatcher();
    }

    public HelloWorldDemo()
    {
        pushScreen(new HelloWorldScreen());

        LED.setConfiguration( 500, 0, LED.BRIGHTNESS_100 );
        LED.setColorConfiguration(500, 0, 0x00FFFFFF);
        LED.setState( LED.STATE_BLINKING );
    }

    public static void errorDialog(final String message)
    {
        UiApplication.getUiApplication().invokeLater(new Runnable()
        {
            public void run()
            {
                Dialog.alert(message);
            }
        });
    }
}

final class HelloWorldScreen extends MainScreen
{

    HelloWorldScreen()
    {
        setTitle("Hello World Demo");
        add(new RichTextField("Hello World!", Field.NON_FOCUSABLE));

           try
           {
                    Player p = Manager.createPlayer("capture://video");
                    p.realize();
                    Field _videoField;
                    VideoControl vc = (VideoControl) p.getControl("VideoControl");
                    FlashControl l = (FlashControl) p.getControl("javax.microedition.amms.control.camera.FlashControl");
                    _videoField = (Field) vc.initDisplayMode (VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
                     vc.setDisplayFullScreen(true);
                     vc.setVisible(true);

                    if(l!=null)
                    {
                        if(l.isFlashReady()==true)
                        {
                            HelloWorldDemo.errorDialog("READY");
                            l.setMode(FlashControl.FORCE);
                        }
                        else
                        {
                            LED.setColorConfiguration(500, 0, 0x00FF7F00);
                            LED.setState( LED.STATE_BLINKING );
                            HelloWorldDemo.errorDialog("NOT READY");
                        }  

                    //l.setMode(FlashControl.FORCE_WITH_REDEYEREDUCE);

                    //l.setMode(FlashControl.FORCE_WITH_REDEYEREDUCE);
                    //p.start();

                    }
                    else
                    {
                        HelloWorldDemo.errorDialog("NULL");
                    }
                  add(_videoField);
                    p.start();

         }
         catch (Exception e)
         {
              HelloWorldDemo.errorDialog("EXEPTION");
         }
    }    

    public void close()
    {
        HelloWorldDemo.errorDialog("Byebye !");
        LED.setState(LED.STATE_OFF);
        super.close();
    }
}

Thank you very much in advance, I'll be mad.

"There is no API in the set of BlackBerry APIs that allow you to control the camera flash on a BlackBerry handheld".

http://supportforums.BlackBerry.com/T5/Java-development/can-I-control-the-quot-Flash-quot-led/m-p/13...

Tags: BlackBerry Developers

Similar Questions

  • 1telephone 6-How do I turn off the flashing as additional notification when you can call to silence

    My husband has somehow given his iPhone 6 so that when his phone is on silent and rings of the flashlight will start to blink.  How us don't disable that?

    Settings > general > accessibility > Flash LED for alerts

  • How can I turn off the Flash Builder AFTER improvement of the system or the installation of new equipment (hard drive)?

    When a machine with an installation of Flashbuilder falls down or is deleted, or when a hard drive is replaced etc. I have not found a way to obtain the active disabled menu again... If this activation is lost forever?

    I got a chat with Adobe support and they released my account! Indeed, it is impossible that ca do you it yourself.

  • How to turn off the flash on a 600ex and still use it to control unit main radio send?

    I have several 600 EX - RT flashes.  Currently, I don't have a ST-E3-RT.  I thought that I read somewhere that you can turn off the flash in one of the of the 600EX and still have it control others.  I would like to be able do this by using a 600EX in my claw with the Flash disabled in Radio mode, controlling the other 600 EX flashes.

    Is this possible to do?  If so what are the steps in specific menus or what is the specific manual page, I need to go to in order to know how to turn the flash on the master to the wide and still, it works like the sending unit for the other 600 in radio mode.

    Thank you

    Jason

    Menu of your camera has a menu option for flash (the specific wording depending on the camera model).

    Enter this menu and tell him to 'disable' the flash.  This will allow the flash to do everything he does (for example the focus-assist beam will work, the radio will work, etc... but he fires the flash to take pictures.)

  • game does not load after you turn off the flash of pepper

    I play a wgt golf game, the game said if I were haveng problems turn off the flash of pepper and I did it and now the game does not load happens to 77% it stops there. Ive been trying to find how to activate the pepper flash then maybe I can play the game but no luck. I can play the game on my other computer without any problem, please help

    Flash Player Help. Installation problems | Mac OS

    Flash Player Help. Installation problems | Windows

    Mylenium

  • How do you turn off the coast of photographic reports (live).

    How do you turn off the coast of photographic reports (live)

    Hello always56,

    Thanks for this info and choosing the communities Support from Apple. I know how important setting in the camera options soft photo is for you!

    Looks like you want to disable Live Photo when shooting. Live Photo is enabled by default. To turn on or turn off, tap on the Live Photos, and when this icon is yellow, pictures Live is on. Here is additional information that will help to understand further.

    Take pictures and videos - iPhone

    See you soon!

  • I need to know how can I turn off the automatic updates of Firefox, because I work in a business that requires that. In the ideal, of group policy or some ways to disable all the computers on the network

    I need to know how can I turn off the automatic updates of Firefox, because I work in a business that requires that.
    In the ideal, of group policy or some ways to disable all the computers on the network

    Some info here (Group Policy)-> http://www.unidesk.com/blog/how-disable-firefox-auto-updates

    Above article refers to-> http://sourceforge.net/projects/firefoxadm/

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

  • How can I turn ON the sound pane on iPad 2 Air?

    How can I turn ON the sound pane on iPad 2 Air?

    In the menu to the bottom of the screen by sliding your finger from the top to the bottom for

  • How can I turn off the laptop after restoring it to factory settings?

    Hello everyone

    I'm selling my Portege R830-10 q If I want to restore it to the settings to factory (out-of-box state) AND THEN TURN IT OFF.

    I brought the laptop to factory settings successfully using the _TOSHIBA recovery Wizard_ and choosing * factory default software recovery (Recover State out-of-box) *. However, at the end of the process of recovery and after everything is back in place I was not able to TURN off the POWER to the laptop. It only gave me the option to restart. After rephrasing it, the Windows installation process starts.

    I don't want to install Windows, i.e. language, keyboard, user account, etc. I want to leave the Windows installation for the person buying the laptop to me. How can I turn off the laptop after the recovery of the system without having to install Windows?

    I would appreciate your help.

    Concerning

    Pedro

    When the recovery process is complete and you are prompted for a reboot just press start button / stop and turn it off. I think it's only thing you can do.

    Anyway, why not start Windows and go through the configuration option. New owner can modify this basic anyway parameters. As username Admin and language and the keyboard can be set as default.

    For example, if you have a picture of German recovery set to German. New owner can change in any case.

  • Satellite A660 how can I turn off the light on the power button?

    Hello, I recently bought a new Toshiba A660-1FL.

    However mind, lighting of the multimedia keys, if I work in the dark.
    In the Bios, I could disable the led lighting, but the on/off switch is always lighting, which distracts me when I'm working.
    This laptop has two power LED, so the lighting power is in my view, unnecessary.

    My question is: How can I turn off the light on the power button?

    Hello

    The power button led cannot be disabled.
    It s there if the laptop is turned on.
    The lighting in the BIOS option only controls the multimedia keys...

    Welcome them

  • How can I turn off the fn on my Z500?

    I have been struggling with this for a few hours, but I still have no solution. I want to use the F1 to F12 keys as standard keys, but I can't find a way to do it. I looked in the BIOS but theres nothing useful. Can someone tell me how can I turn off the FN key?

    Hi all

    Thank you for your patience. We have just published a tip regarding the issue you are facing. Please veiw the link below to to respective BIOS

    http://support.Lenovo.com/en_US/diagnose-and-fix/detail.page?docid=HT080427

    For now, I'll put this post as the solution to guide customers accordingly and will continue to follow the case. Please still post here on the results and should not be considered an adequate solution we umark cela and are continuing their investigation.

    Concerning

  • HOW CAN I TURN OFF THE KEYBOARD SCREEN. IE automatically stop coming.

    HOW CAN I TURN OFF THE KEYBOARD SCREEN. That is to say stop automatically come

    Hello

    ·         What is the operating system installed on the computer?

    Answer with the information above for you help.

  • How can I turn off the touchpad to use a mouse

    How can I turn off the touchpad to use a mouse

    On my computer, plug a mouse automatically disables the touchpad. Check that your computer of operating manual, help files or the Web site of the manufacturer for more details on the functioning of your.

  • How can I turn off the Sansa Fuze

    I just got a 8 GB Sansa Fuze now for Christmas, and I used it for 15 minutes between put some music on it and put it back into my computer, I deeply loved it.

    Now I feel really embarrassed to ask this question because I use a computer for 15 years and have been using MP3 plays since 1999.

    How can I turn off the Sansa Fuze? He said nothing in the manual. What combination of buttons/menu setting to turn it off?

    THX

    Don't be shy, I had a similar experience when I used Sansa.

    Keep the right sliding button for a second or two to turn it off.

    The key is to keep for a while.

    DocStrange wrote:

    I just got a 8 GB Sansa Fuze now for Christmas, and I used it for 15 minutes between put some music on it and put it back into my computer, I deeply loved it.

    Now I feel really embarrassed to ask this question because I use a computer for 15 years and have been using MP3 plays since 1999.

    How can I turn off the Sansa Fuze? He said nothing in the manual. What combination of buttons/menu setting to turn it off?

    THX

  • How can I turn off the xbox 360 controller wireless for pc

    How can I turn off the xbox 360 controller wireless for pc

    Hello!

    I made a small application for this! It is called XboxExt (Manager of the Xbox 360 controller). There is no way to disable the controller in a failure to properly on PC. With the Games Games for Windows Live you can press the GUIDE button on your controller, and you can turn it off.
    So my app is doing the same thing, but not only with Games for Windows Live games. So you can use it anywhere, anytime.
    Best regards
    Parker

Maybe you are looking for