Start PyS60 Tutorials PyS60 Talks Applications Buzz Us Blog

 

Notification, Menus and Forms. Canvas, Content Handler and Queries. Set application title, tabs and set application body. Application screen size and Application Orientation. Text to speech, Playing and Recording sounds and setting volume. Taking a Photo, Recording Video and Using Viewfinder. Accessing Contacts and Adding - Deleting Contact entries. Using the e32 Module. Drawing, Opening and Editing an Image. Checking the Inbox, Reading SMS, Deleting SMS and Waiting for a SMS. Setting Logs, Retrieving Last missed calls, Retrieving Last SMS. Sending SMS, MMS, Email. Battery and Signal, Free Ram and Free Space, IMEI and firmware, phones, display, etc. Making a call, Hanging up calls, Waiting for a call. Displaying Text and showing an Image on a Window. Avoiding Python to be terminated by Red Key and Hiding the shell. Global Notifications and Queries.

 

 

      ADVERTISEMENT

 

 

 

 

Making a call and Hanging up calls:

 

 

#Copyright (c) 2008 Pankaj Nathani

#Displaying text

import TopWindow, graphics, e32, appuifw


#Define the exit function
app_lock=e32.Ao_lock()
def quit():
    window.hide() #Hide the topwindow
    app_lock.signal()
appuifw.app.exit_key_handler=quit

#Create a topwindow instance
window=TopWindow.TopWindow()

#Make a new, blank image; we will use a yellow one
bg=graphics.Image.new((240,140))
bg.clear(0xFFFFBB)

#Write the text on the image
bg.text((30,70), u"croozeus.com", 0x339900, font="title")

#Place the image in the window
window.add_image(bg, (0,0))

#Set the topwindow's size
window.size=(240,140)

#Specify where the window should be shown on the screen
window.position = (0,110)

#Show the window
window.show()

app_lock.wait()

 

 

Showing an Image:

 

 

#Copyright (c) 2008 Pankaj Nathani

#Showing an image

import TopWindow, appuifw, e32, graphics


#Define the exit function
app_lock=e32.Ao_lock()
def quit():
    window.hide() #Hide the topwindow
    app_lock.signal()
appuifw.app.exit_key_handler=quit

#Create a topwindow instance
window=TopWindow.TopWindow()

#Open the desired image
img=graphics.Image.open("C:\\a.jpg")

#Set the topwindow's size
window.size=(100,150)

#Specify where the window should be shown on the screen
window.position = (110,160)

#Place the image in the window, resizing it to fit the window
window.add_image(img, (0,0,window.size[0],window.size[1]))

#Make the window visible
window.show()

app_lock.wait()

 

 

       Copyright © Croozeus.com All rights reserved.                                                                                                                        Webdesign: Jackson Productions