×
Namespaces

Variants
Actions
Revision as of 23:01, 25 September 2009 by fasttrack (Talk | contribs)

Archived:How to detect SMS in outbox in PySymbian

From Nokia Developer Wiki
Jump to: navigation, search
{{{width}}}
{{{width}}}

These code snippets are used to detect the SMS in the outbox using the inbox module in Python

The two methods are as below

Method 1

#import inbox and messaging
import inbox
import messaging
 
#Body of the detecting function
def detect(id)
global outbox
outbox.delete(id)
# send msg again
 
outbox=Inbox(inbox.EOutbox)
outbox.bind(detect)

Method 2

#import inbox and messaging
import inbox
import messaging
 
 
outbox=Inbox(inbox.EOutbox)
 
# send msg code
 
# messages in outbox ?
if outbox.sms_messages() is not None:
# delete all outbox messages !
for m in outbox.sms_messages():
outbox.delete(m)
# send msg again
59 page views in the last 30 days.