notification for app change
Login to reply to this topic.
Wed, 2005-05-18 13:20
Joined: 2004-12-31
Forum posts: 84
hi all
is it possible to get an event as soon as the application in focus changes.
we can get current app in focus by using RWsSession::GetFocusWindowGroup().

but what i want is that OS notify me as soon as the current focussed app changes.

warm regards,
saurabh

warm regards

saurabh


Wed, 2005-05-18 15:43
Joined: 2005-05-18
Forum posts: 5
Hi,

maybe you can try to use CAknAppUi::HandleForegroundEventL.

Code:
void CAppUi::HandleForegroundEventL(TBool aForeground)
   {
if(!aForeground)
   {
//App losts focus
   }
   else
       {
//App gains focus
       }

   CAknAppUi::HandleForegroundEventL(aForeground);
   }
Thu, 2005-05-19 12:35
Joined: 2004-12-31
Forum posts: 84
hi
i dont think this will resolve the problem as it only notifies when ur application gets the focus.

I want to be notified whenever focus changes from one application to another. I think if i call RWindowTreeNode::EnableGroupChangeEvents() or RWindowTreeNode::EnableFocusChangeEvents() i'll be notified with EEventWindowGroupsChanged and EEventFocusGroupChanged respectively. this will resolve my problem.

But again a new problem  how do i get a reference of RWindowTreeNode class. Huh

any comments.

warm regards

saurabh

Thu, 2005-05-19 14:31
Joined: 2004-12-31
Forum posts: 84
we can get a reference of RWindowGroup using
RWindowGroup& iWinGrp = CCoeEnv::Static()->RootWin();

Shocked but the now the call to functions EnableFocusChangeEvents()  and EnableGroupChangeEvents()  is not reporting any events...
may be i dont know where to catch these events ( am doing them in Container's OfferKeyEventL() and in AppUi's HandleKeyEventL() )

Please help

warm regards

saurabh

Tue, 2005-05-24 13:04
Joined: 2004-12-31
Forum posts: 84
hi all
got the solution. event is reported in HandleWsEventL of appui. Smiley

warm regards

saurabh

Mon, 2005-09-12 16:30
Joined: 2005-04-25
Forum posts: 21
hi,
how you implement it in HandleWsEventL?

when i insert HandleWsEventL then my application doesn't react on something.

please help

Sat, 2005-09-17 13:58
Joined: 2004-12-31
Forum posts: 84
u'll need to pass the event to CAknAppUi::HandleWsEventL., after ur processing is over.

warm regards

saurabh

Mon, 2005-10-10 09:32
Joined: 2005-04-25
Forum posts: 21

copyright 2003-2009 NewLC SARL