SDSU Emerging Technologies
Fall Semester, 2005
Python For Series 60 p1
Previous     Lecture Notes Index     Next     
© 2005 All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 13 Oct 2005

Doc 13 Python For Series 60 p1

Contents

 

Short Installation Instructions    

Writing Applications for Cell Phones    

Some Development Platforms    

Symbian    

Nokia Development Platforms    

Series 60 Python Overview    

appuifw Module    

 

Copyright ©, All rights reserved. 2005 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA. OpenContent ( http://www.opencontent.org/opl.shtml ) license defines the copyright on this document.

 

References

 

Python for Series 60 Platform API Reference

Programming with Python for Series 60 Platform

 

 

 

 

Useful References

 

CS457/546 - Information for Python Programming on our Nokia Devices, http://www.csd.uwo.ca/courses/CS457a/python/index.html

 

Matt Croydon PythonForSeries60 Wiki, http://www.postneo.com/postwiki/moin.cgi/PythonForSeries60

 

Nokia Python for Series 60, http://www.forum.nokia.com/python

 

Nokia Python for Series 60 Forum, http://discussion.forum.nokia.com/forum/forumdisplay.php?forumid=102

 

 

 

Documentation

 

Python for Series 60 Platform API Reference

Programming with Python for Series 60 Platform

 

Both are pdf files

Available at http://www.forum.nokia.com/main/0,,034-821,00.html

Go to bottom of page & click on Python for Series 60 Documentation bundle

 

 

Short Installation Instructions

Cell Phone Emulator on Windows

 

Step 1. Download the following

http://www.csd.uwo.ca/courses/CS457a/tutorial/Symbian_python_tutorial.zip

Step 2 Follow the instructions for installing in the above under Environment

 

This is the preferred solution if it works

 

The emulator provides a cell phone interface

 

Python only works when emulator runs in debug mode

 

wxPython for Windows, Linux & Mac OS X

 

Step 1 Install wxPython

Download at: http://wxpython.org /

Download and install version with unicode support

Prebuilt binaries work fine

Follow the instructions with the wxPython download

 

Step 2 Install Series 60 Compatibility Library

Download at: http://pdis.hiit.fi/pdis/download/

Follow the instructions with the download

 

This allows code written for Python Series 60 to run using wxPython widgets

  1. Does not look like applications on cell phone

  1. Not all features will work

 

Supports appuifw, e32, key_codes

 

Hello World Example

 

import appuifw

 

appuifw.note(u'Hello World', 'info')

 

wxPython Version

droppedImage.pict

 

 

 

Writing Applications for Cell Phones

Technical constraints

 

  1. Limited screen space

  1. Limited storage space

  1. Limited memory

  1. Limited power

  1. Slow processor

  1. Restricted user input

  1. Network connection questionable

  1. Feature set of phones vary

  1. Memory leaks not allowed

 

Business Constraints

 

  1. Most phones are not programmable

  1. Multiple incompatible OS/programming systems

  1. How much are people willing to pay for cell phone program

  1. Do people see a need for 3'rd party applications

  1. Main sellers are games and ring-tones

 

 

 

Issues to Consider

  1. Language

  1. Features

  1. Security

  1. Distribution

  1. Phones/providers supported

 

 

Some Development Platforms

  1. Qualcomm Brew

C++, claim some Java support

 

  1. Java J2ME

Support from multiple venders

Abstraction can limit access to phone features

 

  1. WinCE

Multiple devices

Multiple development systems

 

  1. Symbian OS

Primarily Nokia phones

 

  1. Linux

 

Symbian

 

http://www.symbian.com /

Produces OS for advanced cell phones

1200 employees

Owned by:

  1. Ericsson (15.6%)

  1. Nokia (47.9%)

  1. Panasonic (10.5%)

  1. Samsung (4.5%)

  1. Siemens (8.4%)

  1. Sony Ericsson (13.1%)

 

Licensees

Arima

LG Electronics

Panasonic

Ben Q

Motorola

Samsung

Fujitsu

Mitsubishi

Sharp

Lenovo

Nokia

Sony Ericsson

 

40 million Symbian phones at end of Q1 2005

14.5 million Symbian phones shipped first half of 2005

 

 

Symbian OS

 

OS_v9_1_arch_overview_lrg.tiff

Version 9.0 is real-time, previous versions not real-time

 

Supports

  1. GSM, GPRS, EDGE, CDMA

  1. HTTP, TCP/IP, POP3, SMTP, WAP 2.0

  1. HTPS, SSL, TLS

  1. SMS, EMS, MMS

  1. Cameras,OpenGL

  1. Contains two DBMS (database) implementations

  1. multi-tasking

  1. Version 9.0 is real-time, previous versions not real-time

  1. Unicode 3.0

 

 

Nokia Development Platforms

 

Nokai_Platforms_03.tiff

 

 

Nokia Development Platforms

Series 40

  1. Java only

  1. 70 phone models

  1. ~300 million shipped

 

Series 60

 

  1. Java, C++, Python, Visual Basic, C#

  1. 20 phone models

  1. ~20 million shipped

 

Series 80

 

  1. Java, C++, Visual Basic, C#

  1. 2 phone models (Communicator series)

 

CDMA

  1. Based on Series 40

  1. Java only

 

 

Series 60 Python Overview

 

  1. appuifw

application user interface framework

  1. graphics

  1. e32

OS related utilities

  1. e32db

database access with limited SQL

  1. e32dbm

access Symbian RDBMS

  1. messaging (SMS)

  1. location - GMS location

  1. sysinfo

  1. camera

  1. audio

record & play

  1. telephone

  1. calendar

  1. contacts

  1. Extensions to standard libraries

  1. thread

  1. socket - added Bluetooth support

 

appuifw Module

Interface to the Series 60 UI application framework

  1. Module Functions

  1. Application

  1. Forms

  1. Text

  1. Listbox

  1. Icon

  1. Content_handler

  1. Canvas

 

 

 

appuifw Functions

import appuifw

 

userInput = 'Hi mom'

while userInput:

    userInput = appuifw.query(u'Enter a string', 'text', userInput)

    if userInput == None:

        break

    appuifw.note(u'You typed: ' + userInput, 'info')

 

appuifw.note(u'Multi-query', 'info')

answer1, answer2 = appuifw.multi_query(u'A', u'B')

 

appuifw.note(u'popup_menu', 'info')

selectedIndex = appuifw.popup_menu([u'a', u'b', u'c'])

selectedIndex = appuifw.popup_menu([u'a', u'b', u'c'],\

     u'Select one')

 

appuifw.note(u'multi_selection_list', 'info')

selectedIndex = appuifw.multi_selection_list([u'a', u'b', u'c', u'd'], \

    style='checkbox', search_field=1)

 

 

 

First Application

import appuifw

import e32

 

old_title = appuifw.app.title

appuifw.app.title = u"Hello World"

 

class HelloWorld:

    def __init__(self):

        self.lock = e32.Ao_lock()

        appuifw.app.exit_key_handler = self.exit_key_handler

        

    def run(self):

        self.lock.wait()

        self.close()

        

    def exit_key_handler(self):

        self.lock.signal()

 

    def close(self):

        appuifw.app.exit_key_handler = None

  

myApp = HelloWorld()

myApp.run()

appuifw.app.title = old_title

appuifw.menu = None

Previous     visitors since 13 Oct 2005     Next