Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Camera could not start the camera. Close other applications and try opening the camera again.

Here is the situation. I compiled and installed one of the sample applications from the blackberry site.

The application's name is Camera Demo. When I start it i get the following message:

"Camera could not start the camera. Close other applications and try opening the camera again."

The phone is BlackBerry Pearl 3G 9105

When running on simulator it works.

----------------------------------------------------------------------
Press the button to give kudos if I helped you Smiley Happy
Developer
Posts: 133
Registered: ‎04-30-2010
My Device: Curve 8520
My Carrier: T-Mobile

Re: Camera could not start the camera. Close other applications and try opening the camera again.

I have the same problem as dx22, I've derived my camera code from the same RIM sample.  It works fine on an 8520, 9000,9700,9800 but fails with the same error on a 9100.  I think, in my case, it also fails on the 9100 simulator.  I can check later, and provide actual OS versions if needed.

New Contributor
Posts: 4
Registered: ‎01-25-2011
My Device: 9700

Re: Camera could not start the camera. Close other applications and try opening the camera again.

I some time ago also experienced the same thing, which I wrote the following code

 

 

private void initializeCamera() {
		try
        {
			
            Player player = Manager.createPlayer( "capture://video" );
            player.realize();

            _videoControl = (VideoControl)player.getControl( "VideoControl" );
            if (_videoControl != null)
            {
                _videoField = (Field) _videoControl.initDisplayMode (VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
                //_videoControl.setDisplayFullScreen(true);
                _videoControl.setVisible(true);
            }
            player.start();
        }
        catch(Exception e)
        {
            Dialog.alert("ERROR " + e.getClass() + ":  " + e.getMessage());
        }
		
	}

 when I do the tracing in the code I found the problem on

 

 

_videoControl.setDisplayFullScreen(true);

 but can be changed using the following way

 

 

_videoControl.setDisplaySize(Display.getWidth(), Display.getHeight());

 good luck