How to bring to foreground when incoming call?
| Fri, 2003-12-05 23:12 | |
|
I have active object listen incoming call ,it work fine. When incoming call my application can't bring to foreground. i use this code..
TApaTask task(iEikonEnv->WsSession()); task.SetWgId(CEikonEnv::Static()->RootWin().Identifier()); task.BringToForeground(); my purpose, i want to repaint on screen override notedialog(show caller name). Thanks. Atchariya |
|






Forum posts: 5
Can you please help me to bring my app to forground on incomming call.
Regards
rami75lu
Forum posts: 45
void CP2pmAppUi::BringToForeground()
{
TApaTask task(iEikonEnv->WsSession());
task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
task.BringToForeground();
}
as was done with the code posted by atchariya... but the trick is not fighting with the phone.app (the priority client) for the foreground position. To make this work, I setup my code so that it did not try to answer the call on the first ring... by adding a time delay like the following:
User::After(KP2pmWaitTime);
where KP2pmWaitTime is equal to 1000000 ... between the time I open the call to the time I answer the call... seemed to fix the problem. You can probably put this time delay anywhere before the call to BringToForeground() or at the top of the method... so that the phone app has time to register the call...and then switch to you app.
It works for me... but I was okay with letting the phone ring once or twice before pickup. Hope this helps. BTW, this has only been tested on the N6600.
"If we knew what it was we were doing, it would not be called research, would it?" - Albert Einstein