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

Native Development

Reply
Developer
calicratis19
Posts: 163
Registered: ‎12-06-2012
My Device: Z10, Q10
Accepted Solution

how to set the camera flash light so that it doesn't turn of after the picture is taken

Hi I am trying to create a flash light app. I am trying this with Camera Libraray. But I can't seem to make the flash light linger after the photo is taken. It turns off right after the photo is taken.I used this command

 camera_config_flash(handle,CAMERA_FLASH_ON);

 to force the light flash everytime the picture is taken. Do I need to try to this while capturing a video instead? But I also can't seem to start video. 

err = camera_start_video(handle,"/accounts/1000/appdata/com.example.Camera.testDev_ple_Camerab032c86f/data/video", NULL,NULL,NULL);

 the `err` variable returns an error value of 2. This problem is giving me a headache. I really need help to fix this as soon as I can. Thanks.

Developer
calicratis19
Posts: 163
Registered: ‎12-06-2012
My Device: Z10, Q10

Re: how to set the camera flash light so that it doesn't turn of after the picture is taken

Hi can anyone please help me with this. I really need this as soon as I can. Thanks.
Developer
borceg
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB

Re: how to set the camera flash light so that it doesn't turn of after the picture is taken

Developer
jalue
Posts: 196
Registered: ‎03-04-2013
My Device: BB Z10

Re: how to set the camera flash light so that it doesn't turn of after the picture is taken

Hey there...

 

Not entirely sure if you can keep the camera flash light on by using Native Development (non-Cascades). The API available doesn't seem to allow you to do that for Native.

 

For the video capture, did you call the camera_start_video_viewfinder() function before camera_start_video() ?

BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer

Re: how to set the camera flash light so that it doesn't turn of after the picture is taken

The API is definitely available.  The C API is what all the other frameworks are built on top of.

 

camera_config_videolight();

http://developer.blackberry.com/native/reference/bb10/com.qnx.doc.camera.lib_ref/topic/camera_config...

 

That plus camera_open(); are the only 2 functions you need to use to drive the led.

 

Just be aware that when the screen turns off, so will the LED, since the camera hardware is associated with the same power circuit.  This is a limitation we are working to address in a future release.