I am finding some way to get around with global dialogs. By global dialogs I mean dialog like, when phone rings etc.. Also I dont want my application to go in background when phone rings. Please help me in this concern.
OOps it means my applicaiton can't hang in foreground all the time !!
I am more worried about Phone call dialog box. Actually I want my application to answer and hangup incoming call. On incoming call my application answers it, but after then it goes in background, and it cant be put in foreground untill call has finished
This makes my application more funny , it asks for hangup, when system has allowed it to come foreground. And system allows it when call has finished
Your application can reply to the calls but you cant disable global dialogs Anyway you can find some workarrounds so that the dialog will disapear very fast. Does this help you?
I'm facing the same problem. Currently, I'm trying to use global notes. I'm about to check if giving them high-enough priority will override the call dialog. I'll you know. Anyway, for bringing your application to the foreground, you can use:
Code:
TApaTask task(iEikonEnv->WsSession()); task.SetWgId(CEikonEnv::Static()->RootWin().Identifier()); task.BringToForeground(); // SendToBackground() will bring it back to BG
Are there any private API that can achieve what Faiq and me are looking for? Imzadi
I am looking for some way to put the application in foreground, as quick as I can. Do you have any idea how to switch appliation in foreground
Thanks for helping me
I'm not sure i understand what are you asking for now. If you search a way to bring your application in foregroung check TApaTask::BringToForeground(). Is this what you are asking? Or?
I am using same sort of code to overide global notes/box. But its not working still. I have looked into log file and noticed, that the global dialog is putting my app in background, again and again, whenever my app comes in foreground. Here is the code
if( EFalse == aForeground ) { // Application went Background iTracer->Trace( eTrace_Verbose, GETMETHODNAME, _L("Application went Background") );
iTracer->Trace( eTrace_Verbose, GETMETHODNAME, _L("Placing application in foreground - started") );
// Placing it in foreground TApaTask task(iEikonEnv->WsSession()); task.SetWgId(CEikonEnv::Static()->RootWin().Identifier()); task.BringToForeground();
iTracer->Trace( eTrace_Verbose, GETMETHODNAME, _L("Placing application in foreground - finsihed") ); } else { // Application went Foreground iTracer->Trace( eTrace_Verbose, GETMETHODNAME, _L("Application went Foreground") ); } }
I have placed this code in Class derived from CAknViewAppUi. BTW, I am using N6600 - 2.0 SDK
I have read in some post that if we let the phone dialog to remain there for few seconds, and then execute this code then it will work. So i tried out User::After(..) but couldnt work out.
I dont think there would be some private api Imzadi. The phones builtin app doesnt likes any one on some call event, simply. Anyway, lets find out some solution
You will simulate from your app a key pressing (like the user had pressed the ok key for example). Doe this make sense to you? You can simultate a key pressing using RWsSession::SendEventToWindowGroup().
Sure, But by doing this, wouldnt be i giving authority to Phones builtin app to attend the call rather then mine. If the Phone app attends the call, i cant do any operation on call. Matter is hidding or getting rid off
Once we accepted the call, Global Querry Dialog goes off, and another dialog appears showing about current call. However that 2nd dialog box is not the problem, we can switch application.
You can try yourself, during ringing we cant go to phones menu (calendar, profile,...), However once we accpeted the call we can talk and navigate the phone
So the problem is during ringing my application is not able to come foreground. My apps log shows reactive attempt of phone app, when i am trying todo my app foreground - one line is "My app is now in foreground" and another line is "my app is in background", and so on
There are two states were we can't overrise/disable call dialogs. The first is during outgoing call from the moment the user presses dial and untill the other side starts to ring. The user can't switch to other applications. All he can do is end the call. The other state is when receiving calls. We can't do anything untill the call is answered. It looks like all key events are consumed by the phone application and that it's global dialogs have the highest priority so we can cover them or hide. Faiq, after you answer the call, your app should be able to go to the FG. Do you still have problems with that? I believe there is some private API because the phone application IS a phone, well, appliaction! Unfortunately for us, I think it is very private and not even Symbian partner can't get their hands on it.
I can do Foreground once the call is rejected/answered, by my last posted code. I was looking for FG during call event.
You have mentioned -
Quote
It looks like all key events are consumed by the phone application and that it's global dialogs have the highest priority so we can cover them or hide.
Is it really possible !! And what about softkeys down the dialog, would they be ours
Forum posts: 982
pirosl
Forum posts: 78
OOps it means my applicaiton can't hang in foreground all the time !!
I am more worried about Phone call dialog box.
Actually I want my application to answer and hangup incoming call. On incoming call my application answers it, but after then it goes in background, and it cant be put in foreground untill call has finished
This makes my application more funny
Thanks for reading up to here
Forum posts: 982
pirosl
Forum posts: 78
I am looking for some way to put the application in foreground, as quick as I can. Do you have any idea how to switch appliation in foreground
Thanks for helping me
Forum posts: 40
I'm facing the same problem. Currently, I'm trying to use global notes. I'm about to check if giving them high-enough priority will override the call dialog. I'll you know. Anyway, for bringing your application to the foreground, you can use:
task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
task.BringToForeground(); // SendToBackground() will bring it back to BG
Imzadi
Forum posts: 982
I am looking for some way to put the application in foreground, as quick as I can. Do you have any idea how to switch appliation in foreground
Thanks for helping me
I'm not sure i understand what are you asking for now. If you search a way to bring your application in foregroung check TApaTask::BringToForeground(). Is this what you are asking? Or?
pirosl
Forum posts: 78
I am using same sort of code to overide global notes/box. But its not working still. I have looked into log file and noticed, that the global dialog is putting my app in background, again and again, whenever my app comes in foreground.
Here is the code
CCallControlAppUi::HandleForegroundEventL( TBool aForeground )
{
// Logging entry of this Method
METHODNAME( "CCallControlAppUi::HandleForegroundEventL: " );
iTracer->Trace( eTrace_Verbose, GETMETHODNAME, _L("Invoked") );
CAknViewAppUi::HandleForegroundEventL(aForeground);
if( EFalse == aForeground )
{
// Application went Background
iTracer->Trace( eTrace_Verbose, GETMETHODNAME, _L("Application went Background") );
iTracer->Trace( eTrace_Verbose, GETMETHODNAME, _L("Placing application in foreground - started") );
// Placing it in foreground
TApaTask task(iEikonEnv->WsSession());
task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
task.BringToForeground();
iTracer->Trace( eTrace_Verbose, GETMETHODNAME, _L("Placing application in foreground - finsihed") );
}
else
{
// Application went Foreground
iTracer->Trace( eTrace_Verbose, GETMETHODNAME, _L("Application went Foreground") );
}
}
I have placed this code in Class derived from CAknViewAppUi. BTW, I am using N6600 - 2.0 SDK
I have read in some post that if we let the phone dialog to remain there for few seconds, and then execute this code then it will work. So i tried out User::After(..) but couldnt work out.
I dont think there would be some private api Imzadi. The phones builtin app doesnt likes any one on some call event, simply.
Anyway, lets find out some solution
Forum posts: 982
pirosl
Forum posts: 78
So I am trying to put my app back in forground, as soon as possible.
I have no idea how to close these dialogs or simulating a key press
Please let me know in brief
Forum posts: 982
You can simultate a key pressing using RWsSession::SendEventToWindowGroup().
pirosl
Forum posts: 78
But by doing this, wouldnt be i giving authority to Phones builtin app to attend the call rather then mine. If the Phone app attends the call, i cant do any operation on call.
Matter is hidding or getting rid off
Thanks for following up pirosl
Forum posts: 982
pirosl
Forum posts: 78
Once we accepted the call, Global Querry Dialog goes off, and another dialog appears showing about current call.
However that 2nd dialog box is not the problem, we can switch application.
You can try yourself, during ringing we cant go to phones menu (calendar, profile,...), However once we accpeted the call we can talk and navigate the phone
So the problem is during ringing my application is not able to come foreground. My apps log shows reactive attempt of phone app, when i am trying todo my app foreground - one line is "My app is now in foreground" and another line is "my app is in background", and so on
Kind Regards
Faiq
Forum posts: 40
There are two states were we can't overrise/disable call dialogs. The first is during outgoing call from the moment the user presses dial and untill the other side starts to ring. The user can't switch to other applications. All he can do is end the call.
The other state is when receiving calls. We can't do anything untill the call is answered. It looks like all key events are consumed by the phone application and that it's global dialogs have the highest priority so we can cover them or hide.
Faiq, after you answer the call, your app should be able to go to the FG. Do you still have problems with that?
I believe there is some private API because the phone application IS a phone, well, appliaction! Unfortunately for us, I think it is very private and not even Symbian partner can't get their hands on it.
Forum posts: 78
I can do Foreground once the call is rejected/answered, by my last posted code. I was looking for FG during call event.
You have mentioned -
Is it really possible !!
And what about softkeys down the dialog, would they be ours
Kind Regards
Faiq