Setting up a camera app
To use the features of the Camera APIs, you must add the following permissions to your app's bar-descriptor.xml file:
- Camera (use_camera): This permission grants your app the ability to use the camera.
- Shared files (access_shared): This permission allows your app to save captures.
- Microphone (record_audio): This permission allows your app to use the device microphone.
When you're creating your app using C++ and you want to use the Camera APIs, you need to link the Camera libraries by adding the following line to your project's .pro file. This step is not needed if you're creating your app using QML.
For more information about linking against libraries, see Linking against libraries.
You can add using statements to your app's source code to reduce the amount of code you have to write when declaring variables. Here are the using statements found in the C++ version of the camera sample app used in this discussion.
using namespace bb::cascades; using namespace bb::multimedia; using namespace bb::cascades::multimedia;
Last modified: 2014-09-30