Determine whether a feature is available on the camera in its current state.


#include <camera/camera_api.h>
bool camera_can_feature(camera_handle_t handle,                 
                        camera_feature_t feature)


BlackBerry 10.0.0



The handle returned by a call to the camera_open() function.


The specific feature to query.


libcamapi (For the qcc command, use the -l camapi option to link against this library)


The difference between this function and the camera_has_feature() function is that this function indicates the features on the camera are usable in the current camera state rather than just available.

Many developers may choose to use the set of usable features in order to disable specific UI elements in their application. For example: if CAMERA_FEATURE_FLASH is usable when the photo viewfinder is running, but is not usable when the burst viewfinder is running, then they may choose to gray out a flash toggle button in their UI, or they may choose to opt for a longer exposure to compensate in darker scenes.


true when the specified feature is currently usable on the camera, otherwise a value of false.

Last modified: 2014-06-24

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus