×
Namespaces

Variants
Actions

Archived:SMS Assistant - small app using PySymbian

From Nokia Developer 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
Article
Created: User:Kandyfloss (11 Apr 2008)
Last edited: hamishwillee (08 May 2013)

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

This page was last modified on 8 May 2013, at 09:52.
43 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.

×