×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    87

    Detect outgoing SMS?

    Is it possible to detect an outgoing SMS in Py60, and grab the message and recipient's address?

    Otherwise, how hard would it be to write an extension module?

    Thank you

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Detect outgoing SMS?

    Hi and welcome to the Python discussion board.

    I believe this will wok for you:
    Code:
    import inbox, logs, e32, appuifw
    
    
    a=e32.Ao_lock()
    def quit():a.signal()
    appuifw.app.exit_key_handler=quit
    
    def handle_outgoing_message(msg_id):
          #Now you just get whatever info you need. For example, the recipient's number:
          m=logs.sms(mode='out')[0]
          print "Message sent to "+str(m["number"])
    
    #Set the inbox as outbox. I know it sounds weird, but it works
    io=inbox.Inbox(inbox.EOutbox)
    
    #Wait for an outgoing message, and when there is one, call a function to retrieve the info
    io.bind(handle_outgoing_message)
    
    a.wait()
    Just add whatever you might need to this snipper and it should work.

  3. #3
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    87

    Re: Detect outgoing SMS?

    Thank you, Bogdan. Not only is it possible, but very short! How did you find out about it?

Similar Threads

  1. How to detect new unread sms and read the sms
    By exlim in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-05-28, 08:22
  2. Error when deleting outgoing sms, how could we hide it or avoid it ?
    By khalidpeace in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-04-17, 15:26
  3. Initiating an outgoing call after receiving sms
    By helgeman in forum Mobile Java General
    Replies: 9
    Last Post: 2007-08-11, 17:38
  4. Send SMS Problem. Cannot Get SMSC Address. Due to Strange SIM Card?
    By cksong in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-07-02, 16:13
  5. outgoing sms
    By john_malloc in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 5
    Last Post: 2006-07-21, 10:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •