DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Read SMS With Inbox Module
The new pys60 (1.3.1) provide 'inbox' module to read SMS. It can also notify you when a new message arrives.
>>> import inbox >>> i = inbox.Inbox() >>> m = i.sms_messages() # all message ID's >>> i.content(m) # first message uâ€™foobarâ€™ >>> i.time(m) 1130267365.03125 >>> i.address(m) # Only name is given :( uâ€™John Doeâ€™ >>> i.delete(m) >>>
I wish the i.address gave more detail information. Currently, if you need the number, you need to search the <a href=http://bigbold.com/snippets/posts/show/379>contact database</a>. See an example of notification callback in the documentation.