Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Using the camera autofocus feature in Symbian
S60 3rd Edition, Feature Pack 1
S60 3rd Edition, Feature Pack 2
S60 5th Edition
S60 5th Edition
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
S60 3rd Edition FP2 and S60 5th Edition: CCameraAdvancedSettings
Some S60 3rd Edition and newer devices support the camera autofocus feature. There are also methods available to use the autofocus in third-party applications. Autofocus is not officially supported in the S60 SDK before S60 5th Edition and there were different solutions introduced for earlier releases. However, now there is a unified interface available that can be used in all Nokia's S60 devices supporting autofocus.
NEW! Using a Nokia Developer CameraWrapper for expanded compatibility (recommended)
To provide developers an easy-to-use interface for camera functions, Nokia Developer has developed a CameraWrapper. The wrapper provides a unified interface for various Symbian and S60 camera APIs, some of which have previously been Feature Pack specific or only available via an SDK plug-in. The supported features include autofocus, digital zoom, flash, and exposure modes. The wrapper supports all Nokia's S60 devices based on S60 3rd Edition and newer platform versions.
The wrapper provides two header files, armv5 and winscw libraries, and a signed installation package for Nokia's S60 devices. Note that while you can build for winscw, you cannot test the wrapper on an S60 SDK emulator as it does not support camera.
The CameraWrapper is published as part of the S60 Platform: Camera Example v3.0 where its usage is demonstrated.
Note: The Camera Wrapper sis file has a packaging bug which makes the installation fail every second time it is performed on each device. An updated SIS file, which no longer has this problem, can be found at File:Camerawrapper 1.10.0 fixed nobackup.zip
Using the Feature Pack specific APIs
NOTE: Usage of these APIs is not recommended anymore because the CameraWrapper now provides an easier way to access camera functions in different S60 releases.
Using autofocus on S60 3rd Edition, FP2 and newer devices
Autofocus can be controlled via the CCamera::CCameraAdvancedSettings class, which is part of the Symbian Onboard Camera (CCamera) API. In the S60 5th Edition SDK for Symbian OS v0.9 it is defined in ecamadvsettings.h. This class is not part of the S60 3rd Edition, FP2 SDK for Symbian OS v1.1 but you can get it from the SDK API plug-in for the S60 3rd Edition SDK for Symbian OS, for C++, supporting Feature Pack 2 (in version 1.2). Note that the header file name (ecamadvancedsettings.h) and its dependencies somewhat differ from the corresponding file in S60 5th Edition.
Note also that camera hardware used in S60 devices does not support all the functionality defined in CCameraAdvancedSettings. The API provides functions for querying supported settings for each advanced camera feature.
For further information on the usage, see the article Archived:Symbian Onboard Camera Advanced Settings API.
Example application: File:S60 Camera Example AutoFocus 3rd Ed FP2.zip
At least the following S60 3rd Edition, FP2 and newer devices support autofocus: Nokia 5800 XpressMusic, Nokia 6210 Navigator, Nokia 6220 Classic, Nokia N78.
Note: The key event codes and other features of the camera implementations may vary between devices. While supporting most S60 3rd Edition, FP2 devices, the current version of the example application does not yet support Nokia N79 and N96.
Note: When building the example application on the S60 5th Edition SDK, remember to modify the #include's to match the different header file name (ecamadvsettings.h instead of ecamadvancedsettings.h).
Compared to Nokia Developer CameraWrapper, the CCameraAdvancedSettings provides more features. However, you can still use the CameraWrapper as it also provides access to the CCameraAdvancedSettings instance.
Using autofocus on S60 3rd Edition and S60 3rd Edition, FP1 devices
Autofocus was not part of the S60 3rd Edition, FP1 SDK, but it was provided as a plug-in library, included in the S60 Platform: Camera Example with Autofocus Support available on the Nokia Developer website.
Note that because the autofocus implementation has changed in S60 3rd Edition, FP2, there is a binary compatibility break between S60 3rd Edition, FP1 and S60 3rd Edition, FP2. Note that with the introduction of the Nokia Developer CameraWrapper, the use of this plug-in library is not recommended anymore.
Further information on the usage: CS000954 - Implementing autofocus functionality (S60 3rd Edition, pre-FP2)
Example application: S60 Platform: Camera Example with Autofocus Support
The following S60 3rd Edition and S60 3rd Edition, FP1 devices support autofocus: Nokia E66, Nokia E71, Nokia E90 Communicator, Nokia N73, Nokia N82, Nokia N93, Nokia N93i, Nokia N95, Nokia N95-3 NAM, and Nokia N95 8GB.