Revision as of 07:21, 18 September 2012 by
Archived:How to use the camera viewfinder in PySymbian
From Nokia Developer Wiki
Devices(s): Nokia N95, Nokia E90Compatibility
Platform(s): S60 2nd Edition, S60 3rd EditionPlatform Security
Created:(15 May 2007)
Last edited:(18 Sep 2012)
This snippet shows how to use the camera viewfinder in Python.
Note: The camera module is not available for S60 1st Edition.
import appuifw, e32, camera
app_lock = e32.Ao_lock()
#Define the exit function
#Close the viewfinder
#Release the camera so that other programs can use it
appuifw.app.exit_key_handler = quit
#Function for displaying the viewfinder
#Set the application's body to Canvas
appuifw.app.body = appuifw.Canvas()
#Start the viewfinder and keep the backlight on
camera.start_finder(vf, backlight_on = 1)
#Wait for the user to request the exit
The viewfinder is shown on the device's screen and the backlight is kept on.