×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    11

    How to let application know whether the user's focus is in Home Screen

    After letting an application run background, I want the application always to catch an event to notify whether the user's focus is in Home Screen or not. (For instance, Home Screen is shown when user push the home button). Any solutions or hints are appreciated!

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,748

    Re: How to let application know whether the user's focus is in Home Screen

    RWindowTreeNode::EnableFocusChangeEvents, then RWsSession will deliver these events.

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    11

    Re: How to let application know whether the user's focus is in Home Screen

    Quote Originally Posted by wizard_hu_ View Post
    RWindowTreeNode::EnableFocusChangeEvents, then RWsSession will deliver these events.
    As the application sometimes runs background, sometimes runs foreground. Where to receive these events to trigger what I want to do in general. For instance, using HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination) only can catch the event when application is focused when running foreground. How to receive "WS" events when application is sent to backgorund. Thanks.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,748

    Re: How to let application know whether the user's focus is in Home Screen

    Quote Originally Posted by sikamedia View Post
    For instance, using HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination) only can catch the event when application is focused when running foreground.
    That is not true.

  5. #5
    Registered User
    Join Date
    Nov 2004
    Location
    Oulu, Finland
    Posts
    21

    Re: How to let application know whether the user's focus is in Home Screen

    This example gives you the foreground application UID every time it changes. You can use it to detect when the home screen is on top:

    http://wiki.forum.nokia.com/index.ph...eground_events

  6. #6
    Registered User
    Join Date
    May 2010
    Posts
    11

    Re: How to let application know whether the user's focus is in Home Screen

    Thanks! my problem is solved

Similar Threads

  1. Application disappears frome home screen
    By dtorrent in forum General Development Questions
    Replies: 1
    Last Post: 2010-03-18, 16:43
  2. home screen causes application freeze
    By Larry101 in forum Mobile Java General
    Replies: 0
    Last Post: 2010-02-18, 08:44
  3. How to setup the Home Screen Application
    By toyogo00 in forum General Development Questions
    Replies: 1
    Last Post: 2009-11-14, 16:52
  4. Home Screen application on 5th Ed?
    By jupitar in forum Symbian
    Replies: 5
    Last Post: 2009-09-10, 11:18

Posting Permissions

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