| ID | Creation date | March 19, 2007 | |
| Platform | S60 3rd Edition | Tested on devices | Nokia N96 |
| Category | Python | Subcategory | Messaging |
| Keywords (APIs, classes, methods, functions): inbox, SMS |
Python provides inbox module to read SMS from your phone Inbox. It can also notify you when a new message arrives in your Inbox.
# import module
import inbox
i = inbox.Inbox()
m = i.sms_messages() # all message ID's
content_m=i.content(m[0]) # first message
print i.time(m[0]) # arrive time
print i.address(m[0]) # Only name is given :(
# import modules
import inbox
import appuifw
import e32
# Give note on new message
def message(msgid):
box = inbox.Inbox()
appuifw.note(u"A new message:\n %s" % box.content(msgid))
app_lock.signal()
# bind inbox to new message event
box = inbox.Inbox()
box.bind(message)
# Wait for Exit
app_lock = e32.Ao_lock()
app_lock.wait()
No related wiki articles found