Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor kumar1234567's Avatar
    Join Date
    Aug 2010
    Location
    Chennai, India.
    Posts
    176
    Experts,

    I'm doing Trading application. I want to logOut the apps after three minutes when the application is in pause state.

    When its in pause state, I want to exit the apps. how can i do this?

    Can i use timer and and timerTask in the Pause State?

    suggest me ant ideas
    kumar

  2. #2
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    Quote Originally Posted by kumar1234567 View Post
    Experts,

    I'm doing Trading application. I want to logOut the apps after three minutes when the application is in pause state.

    When its in pause state, I want to exit the apps. how can i do this?

    Can i use timer and and timerTask in the Pause State?

    suggest me ant ideas
    kumar

    Which is your target device on S60, apps never go in pause mode - they are just send to background - where you can continue to run the timer, send logout request to server and call destroy app also.
    on S40 devices on which pause app method called when the app goes in paused state - you can directly call destroy app and manage the logout with the help of server side time out for authenticated token or the session key which you expire after 3 or 4 mins if the server does not get any new request with the token within every 5 mins or so.... based on your settings.
    thanks,
    ~Amitabh
    (Poster of the Month -Dec'12)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Regular Contributor kumar1234567's Avatar
    Join Date
    Aug 2010
    Location
    Chennai, India.
    Posts
    176
    Thanks for your help, I don't want to send logout request to the server, if its goes to the paused state i want to exit the application. Right now, i using s40 device.

    Ques is, How I can exit the apps? In my apps, we don't send the logout request. so, I directly call destropApps by using timer for three minutes in pauseApp() method?

  4. #4
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    Quote Originally Posted by kumar1234567 View Post
    Thanks for your help, I don't want to send logout request to the server, if its goes to the paused state i want to exit the application. Right now, i using s40 device.

    Ques is, How I can exit the apps? In my apps, we don't send the logout request. so, I directly call destropApps by using timer for three minutes in pauseApp() method?
    On S40 - timer may not work in pause state on some device hence you will need to directly call destropApps when you come in pauseApp()
    thanks,
    ~Amitabh
    (Poster of the Month -Dec'12)
    Follow me on my blog for Innovative Mobile Apps

  5. #5
    Regular Contributor kumar1234567's Avatar
    Join Date
    Aug 2010
    Location
    Chennai, India.
    Posts
    176
    Quote Originally Posted by im2amit View Post
    Which is your target device on S60, apps never go in pause mode - they are just send to background - where you can continue to run the timer, send logout request to server and call destroy app also.
    Thanks for your reply,

    If it is s60 device, How can i identify that it goes to background and where(Method) i can find that? Could you please explain more in detail?

  6. #6
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    Quote Originally Posted by kumar1234567 View Post
    Thanks for your reply,

    If it is s60 device, How can i identify that it goes to background and where(Method) i can find that? Could you please explain more in detail?
    On S60, when the app goes in background you get a call you get a call in hideNotify() method of your Canvas class.

    protected void hideNotify()
    The implementation calls hideNotify() shortly after the Canvas has been removed from the display. Canvas subclasses may override this method in order to pause animations, revoke timers, etc. The default implementation of this method in class Canvas is empty.

    In your implementation of hideNotify(), you can start a timer and when the timer is finished just exit the app.
    thanks,
    ~Amitabh
    (Poster of the Month -Dec'12)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Replies: 1
    Last Post: 2009-10-11, 06:40
  2. Replies: 20
    Last Post: 2009-07-29, 06:48
  3. How to have the text alignment handled automatically
    By islamfunny in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-03-23, 22:11
  4. Replies: 10
    Last Post: 2008-12-09, 07:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved