Hello everyone..
I am trying to handle key event in an application that is running in the background. I send the application in background using this code:
I write this code in the AppUi constructor, so that the application starts in the background, not visible to the user. Next, in the in my AppContainer class I override the OfferKeyEventL function to perform some action (e.g. bringing the application back to foreground) on the Call button like this:Code:TApaTask task(iEikonEnv->WsSession()); task.SetWgId(CEikonEnv::Static()->RootWin().Identifier()); task.SendToBackground();
But the desired action is not taking place. How can I make the background application respond to normal user behavior, like i said to the call button.Code:TKeyResponse CHelloWorldAppView::OfferKeyEventL(const TKeyEvent& aKeyEvent,enum TEventCode aType) { if (aType == EEventKey) { if (aKeyEvent.iScanCode == EStdKeyYes) { TApaTask task(iEikonEnv->WsSession()); task.SetWgId(CEikonEnv::Static()->RootWin().Identifier()); task.BringToForeground(); return EKeyWasConsumed; } } return EKeyWasNotConsumed; }
Thanks
Sanjay Rajwani!

Reply With Quote



