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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 163
Registered: ‎12-06-2012
My Device: Z10, Q10
My Carrier: BlackBerry
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
Posts: 163
Registered: ‎12-06-2012
My Device: Z10, Q10
My Carrier: BlackBerry

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.
Highlighted
Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

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

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

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
Posts: 683
Registered: ‎11-29-2011
My Device: PRIV
My Carrier: Rogers

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.