I'm developing an application that manage call connecting and capturing media keys to bring the application to foreground when it is hide.(inc-Volume and dec-Volume)
I wrote this lines to increase priority of my applicatin.
This lines send my application to background:Code:// set application as system application so that it will not be closed by system events CEikonEnv::Static()->SetSystem(result); // set application priority to foreground priority even if it goes to background CEikonEnv::Static()->WsSession().ComputeMode(RWsSession::EPriorityControlDisabled);
A user can click incVolume and decVolume sequentially. This lines bring the application to foreground:Code:TApaTask task(CEikonEnv::Static()->WsSession()); task.SetWgId(CEikonEnv::Static()->RootWin().Identifier()); task.SendToBackground();
My Problem:Code:TApaTask task(CEikonEnv::Static()->WsSession()); task.SetWgId(CEikonEnv::Static()->RootWin().Identifier()); task.BringToForeground();
I wrote same lines in EStatusRinging, but when my application goes to background and receive a call, I can't bring the application to foreground. After I reject call or answer call, the application shows.
Do you have any idea to solve my problem?



