×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    20

    strange behave in inbox module

    Hi Community
    I have problem with some thing and I cant to solve it . Maybe you help me.

    When I send a sms from sender emulator to phone emulator I get two returns.
    The one from method detect_sent_sms() and the secend from method detect_incoming_sms().
    I dont know why do I get return from detect_sent_sms() if I send nothing ?

    Is it according with broken API ESent ?

    To test I use standard emulator in SDK.


    import inbox
    import e32

    def detect_incoming_sms(sms_id):
    global boxin
    print("-> detect incoming sms")

    def detect_sent_sms(sms_id):
    global boxsent
    print("0- detect sent sms")

    boxin = inbox.Inbox()
    boxin.bind(detect_incoming_sms)

    boxsent = inbox.Inbox(inbox.ESent)
    boxsent.bind(detect_sent_sms)



    Emulator phone returns:

    0- detect sent sms
    -> detect incoming sms


    Thank you for help
    adamski9000

  2. #2
    Regular Contributor
    Join Date
    Jan 2009
    Location
    India
    Posts
    138

    Re: strange behave in inbox module

    Hi,

    In your code you are calling inbox object twice that's why detect_sent_sms()is called. Because of bind() method is call. so you can call only one call-back method and distinguish the which event is raised, either incoming or outgoing.
    Pavan Pareta
    Sr. Software Engineer
    http://windows-mobile-dev.blogspot.com

  3. #3
    Registered User
    Join Date
    Nov 2005
    Posts
    20

    Re: strange behave in inbox module

    Quote Originally Posted by pavan.pareta View Post
    Hi,

    In your code you are calling inbox object twice that's why detect_sent_sms()is called. Because of bind() method is call. so you can call only one call-back method and distinguish the which event is raised, either incoming or outgoing.
    Thanks Pavan for quick answer, but I have no idea how to do it.
    Could you give me any simple sample or any advice ?

    regards
    Adamski9000

  4. #4
    Registered User
    Join Date
    Nov 2005
    Posts
    20

    Re: strange behave in inbox module

    How detect a few events according with incoming and outgoing in the same time useing bind() ?

    If I write and use bind()

    box = inbox.Inbox()
    box.bind(detect_incoming_sms)


    I get only result from incoming box

    if I write

    box = inbox.Inbox(inbox.ESent)
    box.bind(detect_sent_sms)


    I get only result from outgoing box.

    Is any way to get the same result using ONE function bind() ?
    any suggestions ?

    thanks

  5. #5
    Registered User
    Join Date
    Nov 2005
    Posts
    20

    Re: strange behave in inbox module

    I found the same problem on forum

    solution:
    http://discussion.forum.nokia.com/fo...ight=gonzalezm

    regards

Similar Threads

  1. Buggy AMR Audio Recording. Please Help!!
    By jhamby in forum Symbian
    Replies: 8
    Last Post: 2009-07-07, 10:34
  2. How to create a sis using ensymble and Python 1.9.4 ?
    By marcelobarrosalmeida in forum Symbian
    Replies: 10
    Last Post: 2009-05-27, 10:16
  3. Replies: 6
    Last Post: 2009-02-17, 16:09
  4. Carbide.j 1.5 and Netbeans 5.5 beta 2
    By ovjo12 in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2007-06-11, 05:43
  5. strange behaviour with sm inbox module
    By novis in forum Symbian
    Replies: 0
    Last Post: 2007-05-03, 22:23

Posting Permissions

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