×
Namespaces

Variants
Actions
Revision as of 05:34, 27 July 2012 by hamishwillee (Talk | contribs)

Archived:SMS Assistant - small app using PySymbian

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: User:Kandyfloss (11 Apr 2008)
Last edited: hamishwillee (27 Jul 2012)

This is a small working messaging application using Python. This application assists in sending predefined SMS auto replies, to the recipient. The script can be converted to a SIS installation file using ensymble for 3rd Ed devices.

#SMS Assistant
#import the module inbox (that handles incoming sms things)
import inbox
#import the module e32
import e32
#import the module appuifw
import appuifw
#import the module messaging
import messaging
 
appuifw.app.title=u"SMS Assistant"
# Sets application titile
 
 
# Defines exit function
def exit_key_handler():
app_lock.signal()
 
#Define autoreply function
def read_sms(id):
 
e32.ao_sleep(0.1)
# create once more an instance of the inbox() class
i=inbox.Inbox()
# read the content out of the message that has just arrived
sms_text = str(i.content(id))
# display the content inside a pop-up note
print sms_text
m = i.sms_messages() # all message ID's
if sms_text:
messaging.sms_send(i.address(m[0]),data)
 
L = [u'Set AutoReply', u'Exit']
 
# create the selection list
index = appuifw.selection_list(choices=L, search_field=1)
 
# Trigger action on index selection
if index == 0:
data = appuifw.query(u"Type autoreply text:","text")
i=inbox.Inbox()
print "Waiting for Incomming SMS"
i.bind(read_sms)
 
if index == 1:
exit_key_handler()
 
app_lock = e32.Ao_lock()
 
appuifw.app.exit_key_handler = exit_key_handler
app_lock.wait()


Here are some screenshots that demonstrate the working of the application - SMS Assistant


Screenshot0029.jpgScreenshot0030.jpgScreenshot0032.jpg

50 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.

×