×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    May 2010
    Location
    Egypt
    Posts
    433

    Question appuifw.query , Block the application

    Hi all,

    My program suppose to watch incoming SMS' , and deals with it based on certain text and display an appuifw.query to the user and ask him what to do .... So here is the thing , If my application displays this query waiting for user respond that means that my application freeze and doesn't respond or react for the new coming SMS' till the user dismiss this query.


    Is there any work around this problem ??

    Using sending keys to close this query not the best answer for my program techinque....

    Using global_query with a time limitation for respond and choosing a defautl choise not right to my program techinque too.....

    I'm using PyS60 2.0.0 , Targeting S60 3rd Ed FP1 and forward.
    ]
    Mny thanks in advance.

  2. #2
    Registered User
    Join Date
    Nov 2009
    Posts
    37

    Re: appuifw.query , Block the application

    did you use the "bind" function to assign a callback function ?
    Than it should be non blocking.

    In my Sensor and GPS Programs i do it this way, and the SW lost no Data regardless if an query is open or not.

  3. #3
    Registered User
    Join Date
    May 2010
    Location
    Egypt
    Posts
    433

    Re: appuifw.query , Block the application

    Hi telemaxx,

    Yes, I'm using "bind" of course to watch incoming SMS', consider this situation : -

    If my program deals with incoming SMS' and Incoming calls , If I receive SMS with a certain text I'm going to show 'query' and waiting for user respond , in the mean time if I have Incoming call from a certain number and I suppose to react to this number and show also a 'query' , that's not going to happen because the user didn't respond to the first 'query' ..... So my program now is Frozen and out of service till the user respond to each query .... I hope I made it clear this time.
    Last edited by ashraf fawzy; 2010-09-09 at 05:38.

  4. #4
    Nokia Developer Champion
    Join Date
    Sep 2007
    Location
    Bhavnagar
    Posts
    928

    Re: appuifw.query , Block the application

    Hi,
    I am not sure if it is suitable for you or not but have you think about using the multi_query after closing old query ?
    Jajal Mehul

  5. #5
    Registered User
    Join Date
    May 2010
    Location
    Egypt
    Posts
    433

    Re: appuifw.query , Block the application

    hi james,

    multi_query won't make any difference , I want my program to stay able to react and respond to incoming calls and sms' after it shows 'query' .

    why 'query' freeze the sequence of my program and prevent it to respond and react till the user close this 'query' ???

    any ideas would be appreciated.

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    90

    Re: appuifw.query , Block the application

    You probably could do the checking of new messages and calls in a "background" thread. Make that thread keep a list of new incoming items - runnng constantly - which list your main app loop would poll and make the query about and then remove from the list.

  7. #7
    Registered User
    Join Date
    May 2010
    Location
    Egypt
    Posts
    433

    Re: appuifw.query , Block the application

    Many thanks mvuori for your reply , some how I feel your answer but I'm confused a little bit about this line :

    Make that thread keep a list of new incoming items - runnng constantly - which list your main app loop would poll and make the query about and then remove from the list.
    I'm using this code below to notify me when incoming call event happens :-
    Code:
    def handle_call(callstate)
        #globalui.global_note(u'You have received %d missed calls','info')
    
    telephone.incoming_call() # waits for an incoming call
    telephone.call_state(handle_call)
    So how can I make it to run in a different thread other than the UI thread ??


    If you can explain it a little more that would be appreciated.

  8. #8
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: appuifw.query , Block the application

    Hi, ashraf

    When you are checking your sms at that time your call goes in background mode. And when you are handling call the query dialog goes in to the background.

    You have to use the code from here : How to switch application

Similar Threads

  1. appuifw.query('','date', initial value?)
    By cpohl in forum Symbian
    Replies: 2
    Last Post: 2010-06-11, 10:45
  2. appuifw.query with localtime
    By albgarse in forum Symbian
    Replies: 13
    Last Post: 2009-04-03, 10:41
  3. Problem using appuifw.Query
    By james1980 in forum Symbian
    Replies: 6
    Last Post: 2008-10-13, 13:42
  4. appuifw.query('', 'date')
    By executable in forum Symbian
    Replies: 3
    Last Post: 2008-05-12, 12:54
  5. default value in appuifw.query
    By sverre80 in forum Symbian
    Replies: 0
    Last Post: 2005-11-03, 00:48

Posting Permissions

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