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

 

 

 

 

Drawing:

 

#Copyright (c) 2008 Pankaj Nathani

#Checking whether an SMS has been read

import inbox


i=inbox.Inbox()

#For example, we will check if the latest SMS has been read
id=i.sms_messages()[0]

if(i.unread(id)==1):
    print "Unread"
else:
    print "Read"

 

 

Reading SMS, Deleting SMS:

 

#Copyright (c) 2008 Pankaj Nathani

#Retrieving the content of the latest SMS and deleting it

import inbox


#Create an instance of the inbox
i=inbox.Inbox()

#Get the ID of the latest SMS
id=i.sms_messages()[0]

#Print its content
print i.content(id)

#And then delete the SMS
i.delete(id)

 

 

Retrieving Last SMS:

 

#Copyright (c) 2008 Pankaj Nathani

#Waiting for an incoming SMS

import inbox, e32, appuifw


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

#Define the function to be executed when a message is received
def cb(id):
    print "New message!"

i=inbox.Inbox()

#Now wait for the message:
i.bind(cb)

app_lock.wait()

 

 

 

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