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
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Camera - Video Mode and Flash Mode Light?

Hi,

 

I was wonering how I set the camera to video mode and how I always keep the flash on, I've tried CameraFlashMode::Light but no luck.

 

Here's my code so far:

 

camera->open(CameraUnit::Rear);
            camera->startViewfinder();
            CameraSettings * settings = new CameraSettings();
            camera->getSettings(settings);
            settings->setFlashMode(CameraFlashMode::Light);
            camera->applySettings(settings);

 

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Retired
Posts: 155
Registered: ‎07-16-2012
My Device: Dev Alpha
My Carrier: Bell

Re: Camera - Video Mode and Flash Mode Light?

Hi JeffLemon,

 

you could try something like this:

 

 Camera *camera = appPage->findChild<Camera*>("myCamera");
 QObject::connect(camera, SIGNAL(shutterFired()), this, SLOT(onShutterFired()));
 camera->setPreferredWidth(768);
 camera->setPreferredHeight(1280);
 camera->open(CameraUnit::Rear);
 CameraSettings* cameraSettings = new CameraSettings();
 cameraSettings->setCameraMode(CameraMode::Video);
 cameraSettings->setFlashMode(CameraFlashMode::Light);
 camera->applySettings(cameraSettings);
 camera->startViewfinder();

 

Cheers,

Contributor
Posts: 43
Registered: ‎01-05-2013
My Device: Dev Alpha
My Carrier: Telenor Hungary

Re: Camera - Video Mode and Flash Mode Light?

Hi amarcon,

I've tried the method what you mentioned, but it's still not working. Have you any other tips?

I have an Alpha B with the latest firmware.

Thx,
chriske
--------------------------------------------------------------
If my post was helpful or it was the solution for Your problem, please don't forget to give me a like, and mark my post as a solution. Thanks!