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.

Archived:How to take a picture and send it over Bluetooth using PySymbian

From Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Tested with
Devices(s): Nokia N96
Platform(s): S60 2nd Edition, S60 3rd Edition
Keywords: camera
Created: giaperrucci (07 Jun 2007)
Last edited: hamishwillee (14 Jun 2013)



This Python code shows how to take a picture and send it using Bluetooth (OBEX). The script uses camera, e32, socket and graphics modules.

Code Snippet

# import modules
import appuifw, camera, e32
from graphics import *
from socket import *
# Create menu
def main_menu():[(u"Take photo", take_picture),
(u"Send", Send),
# Application body
# Function for the viewfinder
def vf(im):
# Start viewfinder
# Function for taking the picture
def take_picture():
# Take the photo
photo = camera.take_photo('RGB', (1024, 768))
# Save it at maximum quality"e:\\photo.jpg", quality = 100)
# Stop the viewfinder
# Display image
# Function to send Image
def Send():
channel=bt_obex_discover(address)[1][u'OBEX Object Push']
def app_exit():
camera.release() #Release the camera so other applications may use it
lock=e32.Ao_lock()"BT example"


The following screenshots are the outcome.

Example5-1.jpgExample5-2.jpg Example5-3.jpgExample5-4.jpg

Related Links

This page was last modified on 14 June 2013, at 05:10.
79 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.