Disable global dialogs

Login to reply to this topic.
Sun, 2006-04-23 17:38
Joined: 2006-04-17
Forum posts: 78
Hello!!

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.

Sun, 2006-04-23 21:25
Joined: 2004-05-24
Forum posts: 982
Re: Disable global dialogs
If you think at some api...there is no way to disable this Sad

pirosl

Mon, 2006-04-24 22:43
Joined: 2006-04-17
Forum posts: 78
Re: Disable global dialogs
Thanks pirosl, for prompt reply.

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  Shocked

This makes my application more funny Grin, it asks for hangup, when system has allowed it to come foreground. And system allows it when call has finished

Thanks for reading up to here
Mon, 2006-04-24 23:06
Joined: 2004-05-24
Forum posts: 982
Re: Disable global dialogs
Your application can reply to the calls but you cant disable global dialogs Sad Anyway you can find some workarrounds so that the dialog will disapear very fast. Does this help you?

pirosl

Mon, 2006-04-24 23:31
Joined: 2006-04-17
Forum posts: 78
Re: Disable global dialogs
Yeah thanks, this idea is better.

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
Tue, 2006-04-25 09:10
Joined: 2003-10-21
Forum posts: 40
Re: Disable global dialogs
Hi Faiq,

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
Tue, 2006-04-25 09:43
Joined: 2004-05-24
Forum posts: 982
Re: Disable global dialogs
Quote from: Faiq
Yeah thanks, this idea is better.

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

Tue, 2006-04-25 17:29
Joined: 2006-04-17
Forum posts: 78
Re: Disable global dialogs
Hi all,

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

Code:
void
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
Tue, 2006-04-25 17:45
Joined: 2004-05-24
Forum posts: 982
Re: Disable global dialogs
Do you need those dialogs? I mean can't you close them? (by simulating a key presing from your app)

pirosl

Tue, 2006-04-25 17:58
Joined: 2006-04-17
Forum posts: 78
Re: Disable global dialogs
I dont need these dialogs at all. But it seems i cant get rid of them.
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
Tue, 2006-04-25 20:09
Joined: 2004-05-24
Forum posts: 982
Re: Disable global dialogs
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().

pirosl

Tue, 2006-04-25 22:23
Joined: 2006-04-17
Forum posts: 78
Re: Disable global dialogs
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  Huh

Thanks for following up pirosl
Tue, 2006-04-25 22:38
Joined: 2004-05-24
Forum posts: 982
Re: Disable global dialogs
But what happens if you reply on the call from you application? The global message will dissapear rigth? Or?

pirosl

Tue, 2006-04-25 23:02
Joined: 2006-04-17
Forum posts: 78
Re: Disable global dialogs
Nice point.

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
Wed, 2006-04-26 08:53
Joined: 2003-10-21
Forum posts: 40
Re: Disable global dialogs
Hi Faiq and Pirosl,

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.
Wed, 2006-04-26 12:59
Joined: 2006-04-17
Forum posts: 78
Re: Disable global dialogs
Thanks for confirmation, imzadi_il

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

Kind Regards
Faiq
  • Login to reply to this topic.