
S60 Platform: Camera Example v3.0
=================================

This Symbian C++ code example demonstrates how to easily use the onboard camera 
utilising an accompanying CameraWrapper made by Forum Nokia. The application 
features autofocus and zoom and it supports Nokia's S60 3rd Edition and newer 
devices, as well as the use of both keypad and touch UI. 

The application can be self-signed, but it also provides an option to use the 
dedicated camera key by defining the ENABLE_CAMERA_SHUTTER flag in the file 
CameraWrapperExample.mmp. In this case, Symbian signing is required.

The example application replaces the separate examples published for:

- S60 3rd Edition, FP1 
  (S60 Platform: Camera Example with AutoFocus Support v2.2
  [http://www.forum.nokia.com/info/sw.nokia.com/id/2f492479-ac8c-4c3e-aa90-cc883e190d83/S60_Platform_Camera_Example_with_AutoFocus_Support_v2_2_en.zip.html])

- S60 3rd Edition, FP2
  (S60 Camera Example AutoFocus 3rd Ed FP2
  [http://wiki.forum.nokia.com/index.php/Image:S60_Camera_Example_AutoFocus_3rd_Ed_FP2.zip])


CAMERAWRAPPER
-------------
CameraWrapper 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. A signed binary of the 
wrapper is included in the example package. 

How to install CameraWrapper
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy the contents of the folder CameraExample\camerawrapper\epoc32 into the 
Symbian SDK epoc32 folder, for instance 
C:\S60\devices\S60_5th_Edition_SDK_v0.9\epoc32.

The required headers, binaries and SISX package are installed into the SDK.

-------------------------------------------------------------------------------

PREREQUISITES

- Symbian OS key concepts.

--------------------------------------------------------------------------------

IMPORTANT FILES/CLASSES

CameraWrapperExampleAppUi.h : An example application UI class that listens for 
screen orientation changes and application foreground/background changes, as 
well as capturing camera shutter key events.

CameraWrapperExampleAppView.h : The main view of the application that has the
CCameraEngine camera wrapper as a member variable, and demonstrates 
CCameraEngine API usage.


Classes: CCameraEngine, MCameraEngineObserver, MCoeForegroundObserver, 
          CFbsBitGc.

--------------------------------------------------------------------------------

TOUCH UI SUPPORT

Pointer events are handled in 
CCameraWrapperExampleAppView::HandlePointerEventL(). When touching the screen, 
the application captures the new picture.

--------------------------------------------------------------------------------

KNOWN ISSUES

The example can be compiled for the WINSCW target, but the camera does not work 
in the emulator. 

On the Nokia E90 Communicator, the camera shutter key cannot be used while the 
cover is open.

--------------------------------------------------------------------------------

RUNNING THE EXAMPLE

The application supports both touch UI and the keypad.


Touch-enabled devices
~~~~~~~~~~~~~~~~~~~~
Touch the screen to autofocus and capture an image.

Non-touch devices
~~~~~~~~~~~~~~~~~
Press the selection key to autofocus and capture an image. If 
ENABLE_CAMERA_SHUTTER is defined, use the camera key to control autofocus and 
shutter release. Press up/down to zoom.

--------------------------------------------------------------------------------

BUILD & INSTALLATION INSTRUCTIONS

The CameraWrapper.sisx package is embedded in the CameraExample package.

MOBILE DEVICE
~~~~~~~~~~~~~
    Go to /CameraExample/group.
    bldmake bldfiles
    abld build gcce urel
    Go to /CameraExample/sis.
    Edit the paths in CameraWrapperExample_S60.pkg to match those in your 
     development environment.
    makesis CameraExample_S60.pkg

    The application can be self-signed.

    If you wish to receive camera shutter key events (define the 
    ENABLE_CAMERA_SHUTTER flag in the mmp file), the application has to be 
    signed using, for example, Open Signed Online.

    Install the signed .sis file on a device.

EMULATOR
~~~~~~~~~
The application can be run on the emulator but there is no camera support.
    
--------------------------------------------------------------------------------

COMPATIBILITY

S60 5th Edition
S60 3rd Edition, Feature Pack 2
S60 3rd Edition, Feature Pack 1
S60 3rd Edition

Tested with: Nokia 5800 XpressMusic, Nokia E90 Communicator, Nokia E71, 
Nokia N80, Nokia N96.

Created / tested with: S60 5th Edition SDK.

--------------------------------------------------------------------------------

VERSION HISTORY

3.0 Forum Nokia CameraWrapper API taken into use for easier use and better 
compatibility between S60 releases. Replaces S60 Platform: Camera Example with 
AutoFocus Support v2.2.

Previous versions based on direct usage of Symbian Onboard Camera API and 
AutoFocus API:

2.2 Context-sensitive help implemented.
    About dialog implemented.
    Lots of small bugfixes.

2.1 Added support for AutoFocus, using the AF extension library.
    Added support for capturing images in EXIF JPEG format.
    References to unsupported MCameraObserver2 (and related classes) removed.

2.0 Support for S60 3rd Edition added.
  Changes to the mechanism used to play a snap sound while capturing an image 
  (the required Camera1a_2_8kHz.wav file is no longer automatically present 
  in newer devices, and the file is delivered in the installation package).

1.0 First release.

--------------------------------------------------------------------------------

RELATED DOCUMENTATION

KIS000563 - Camera shutter key (EKeyCamera events) cannot be used in 3rd party 
 applications:
http://wiki.forum.nokia.com/index.php/KIS000563_-_Camera_shutter_key_(EKeyCamera_events)_cannot_be_used_in_3rd_party_applications

CS000821 - Handling Camera resource:
http://wiki.forum.nokia.com/index.php/CS000821_-_Handling_Camera_resource

Symbian Signed  Open Signed Online:
https://www.symbiansigned.com/app/page/public/openSignedOnline.do