| ID | CS000826 | Creation date | February 21, 2008 |
| Platform | S60 3rd Edition S60 3rd Edition, FP1 S60 3rd Edition, FP2 | Tested on devices | Nokia E90 Communicator Nokia N95 8GB |
| Category | Symbian C++ | Subcategory | Hardware |
| Keywords (APIs, classes, methods, functions): CCamera, CCamera::CamerasAvailable() |
This code snippet describes how to determine the number of cameras on the device. Naturally, the same technique lets one to determine whether the device has a camera or not.
This snippet can be self-signed.
The following libraries are required:
#include <ECam.h>
// The number of cameras present on the device is stored in the cameras variable.
TInt cameras = CCamera::CamerasAvailable();
if (cameras == 0)
{
// The device doesn't have a camera. For example, Nokia E61
}
No related wiki articles found