Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Developer
marcroboy
Posts: 14
Registered: 11-06-2009

Global Screen alert and Phone call

Hi, my program listens to a server and launches an global notification using pushGlobalScreen when the server pushes important info to the client .

 

 

 NotifyingGUI screen = new NotifyingGUI(incoming.toString(),s);
UiEngine ui = Ui.getUiEngine(); ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_QUEUE);

The notification object extends Dialog and will also start  a vibration alert in the class.

 

While testing on the simulator, I noticed that this will get pushed even if the user was in a phone call, and presumably in other application as well. Since neither the screen nor the vibration is desired during a phone call, how do we resolve this?

 

I'm quite new to blackberry programming so I'm unfamiliar as to how to deal with these kind of global interactions. Any help is greatly appreciated.

 

Cheers

 

Please use plain text.
Developer
RexDoug
Posts: 4,649
Registered: 07-21-2008

Re: Global Screen alert and Phone call

Use:

 

PhoneCall call = Phone.getActiveCall()

 

..to determine if there is an active call. If there is, try the notification later.

 

Please use plain text.
New Developer
marcroboy
Posts: 14
Registered: 11-06-2009

Re: Global Screen alert and Phone call

Thanks for the reply. I will look into the phone api to give it a try.

 

 

Just as a side point, are there any other solutions to this? I'm wondering because I could forsee the user might have other operations that might not want to be interrupted by my notificaiotn. Is there a way to set some sort of global priority? The priority in the pushglobalscreen field  only refers to the priority between other global screens.

Please use plain text.
Developer
ydaraishy
Posts: 562
Registered: 09-30-2009

Re: Global Screen alert and Phone call

Maybe something like using ApplicationMessage(s) will be a better thing to do?

Please use plain text.
New Developer
marcroboy
Posts: 14
Registered: 11-06-2009

Re: Global Screen alert and Phone call

I'm looking for JDE.4.2.1 though due to some client using older version blackberries.

Please use plain text.